Skip to content

Commit 8058c53

Browse files
authored
Merge pull request #54 from AzureCosmosDB/rss-feed
update RSS
2 parents c30dc4b + 1f171c3 commit 8058c53

File tree

2 files changed

+335
-260
lines changed

2 files changed

+335
-260
lines changed

docusaurus.config.js

Lines changed: 29 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,53 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
33

4-
// USAGE: Config object can be accessed via React context as `{siteConfig}`
5-
// See: https://docusaurus.io/docs/configuration#custom-configurations
6-
/** @type {import('@docusaurus/types').Config} */
7-
84
import { themes as prismThemes } from "prism-react-renderer";
95
import { manageCookieLabel } from "./constants.js";
106

7+
/** @type {import('@docusaurus/types').Config} */
118
const config = {
12-
// CONFIG: Add Custom Fields - globally reference them from siteConfig
13-
// See: https://docusaurus.io/docs/deployment#using-environment-variables
149
customFields: {
1510
env: process.env.REACT_APP_GITHUB_TOKEN,
1611
description:
1712
"Your one-stop for everything Azure Cosmos DB. Code samples, docs, videos, decks, etc. Everything in one location. Community contributions are welcome.",
1813
},
1914

20-
// CONFIG: Landing Pages uses this (also globally via siteConfig)
2115
title: "Azure Cosmos DB Gallery",
2216
tagline: "Discover - Create - Contribute",
23-
24-
// CONIFIG: Used for GitHub Pages
2517
url: "https://azurecosmosdb.github.io",
2618
baseUrl: "/gallery/",
2719
favicon: "img/favicon.ico",
2820
organizationName: "azurecosmosdb",
2921
projectName: "gallery",
3022
deploymentBranch: "gh-pages",
3123

32-
// CONFIG: Early detection for site health
3324
onBrokenLinks: "throw",
3425
onBrokenMarkdownLinks: "warn",
3526

36-
// CONFIG: Localization if supporting multiple languages
3727
i18n: {
3828
defaultLocale: "en",
3929
locales: ["en"],
4030
},
4131

42-
// CONFIG: scripts
4332
scripts: [
4433
"https://js.monitor.azure.com/scripts/c/ms.analytics-web-4.min.js",
4534
"https://wcpstatic.microsoft.com/mscc/lib/v2/wcp-consent.js",
4635
],
4736

48-
// CONFIG: theme = set properties for UI like navbar, footer, docs, copyright etc.
49-
// See: https://docusaurus.io/docs/api/docusaurus-config#themeConfig
5037
themeConfig:
5138
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
5239
({
53-
// CONFIG: sidebar
54-
// See:
5540
docs: {
5641
sidebar: {
5742
hideable: true,
5843
autoCollapseCategories: false,
5944
},
6045
},
61-
62-
// CONFIG: default theme color mode
63-
// See:
6446
colorMode: {
6547
defaultMode: "light",
6648
disableSwitch: false,
6749
respectPrefersColorScheme: true,
6850
},
69-
70-
// CONFIG: navbar logo, items, style, stickiness
71-
// See: https://docusaurus.io/docs/next/api/themes/configuration#navbar
7251
navbar: {
7352
title: "Azure Cosmos DB Gallery",
7453
logo: {
@@ -80,8 +59,6 @@ const config = {
8059
height: 32,
8160
},
8261
items: [
83-
// CONFIG:
84-
// Make sure you have class defined in src/css/custom.css
8562
{
8663
type: "custom-NavbarButton",
8764
position: "right",
@@ -93,9 +70,6 @@ const config = {
9370
},
9471
],
9572
},
96-
97-
// CONFIG:
98-
// See:
9973
footer: {
10074
style: "light",
10175
links: [
@@ -117,51 +91,52 @@ const config = {
11791
},
11892
],
11993
},
120-
121-
// CONFIG: the prism-react-renderer to highlight code blocks, add magic comments (influence code highlighting)
122-
// Change: 'theme' and `darkTheme` constants at top of this config file
123-
// See: https://docusaurus.io/docs/next/api/themes/configuration#codeblock-theme
124-
// See: https://docusaurus.io/docs/next/markdown-features/code-blocks#custom-magic-comments
125-
// For additional languages e.g., 'csharp','java','js','typescript','python', 'rust', 'html','css', 'go', 'dart'
126-
// See: https://docusaurus.io/docs/next/markdown-features/code-blocks#supported-languages
127-
// See: https://prismjs.com/#supported-languagescshar
12894
prism: {
12995
theme: prismThemes.github,
13096
darkTheme: prismThemes.dracula,
13197
},
13298
}),
13399

134-
// CONFIG: plugins
135-
// See
136100
plugins: [
137101
[
138102
"@docusaurus/plugin-ideal-image",
139103
{
140104
quality: 70,
141-
max: 1030, // max resized image's size.
142-
min: 640, // min resized image's size. if original is lower, use that size.
143-
steps: 2, // the max number of images generated between min and max (inclusive)
105+
max: 1030,
106+
min: 640,
107+
steps: 2,
144108
disableInDev: false,
145109
},
146110
],
147111
],
148112

149-
// CONFIG: Set presets for chosen theme
150-
presets: [
151-
[
152-
'@docusaurus/preset-classic',
153-
{
154-
gtag: {
155-
trackingID: 'G-CNSKHL41CT',
156-
anonymizeIP: true,
113+
presets: [
114+
[
115+
'@docusaurus/preset-classic',
116+
{
117+
blog: {
118+
showReadingTime: true,
119+
routeBasePath: 'blog',
120+
blogTitle: 'Azure Cosmos DB Gallery Blog',
121+
blogDescription: 'Latest updates, community stories, and developer news',
122+
feedOptions: {
123+
type: 'all', // 'rss' | 'atom' | 'all'
124+
title: 'Azure Cosmos DB Gallery Blog RSS Feed',
125+
description: 'Stay updated with new blog posts from Azure Cosmos DB Gallery',
126+
language: 'en',
127+
copyright: `Copyright © ${new Date().getFullYear()} Microsoft`,
157128
},
158-
theme: {
159-
customCss: require.resolve("./src/css/custom.css"),
160-
}
161-
}
162-
],
129+
},
130+
gtag: {
131+
trackingID: 'G-CNSKHL41CT',
132+
anonymizeIP: true,
133+
},
134+
theme: {
135+
customCss: require.resolve("./src/css/custom.css"),
136+
},
137+
},
163138
],
164-
139+
],
165140
};
166141

167142
module.exports = config;

0 commit comments

Comments
 (0)