Skip to content

Commit d23d6c5

Browse files
committed
Enable search
add sitemap
1 parent a729885 commit d23d6c5

File tree

2 files changed

+69
-4
lines changed

2 files changed

+69
-4
lines changed

.editorconfig

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 2
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
[*.html]
14+
indent_style = tab
15+
indent_size = 4
16+
17+
[{*.ctp,*.hphp,*.inc,*.module,*.php,*.php4,*.php5,*.phtml}]
18+
indent_style = tab
19+
indent_size = 4
20+
ij_continuation_indent_size = 4
21+
ij_smart_tabs = true

docusaurus.config.js

+48-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const mainNavItems = createNavItems('./docs');
1111

1212
/** @type {import('@docusaurus/types').Config} */
1313
const config = {
14-
noIndex: true, // set to false to enable search engine indexing
14+
noIndex: false, // set to false to enable search engine indexing
1515

1616
title: 'Rootstock Developers Portal',
1717
tagline: 'Welcome to Rootstock',
@@ -59,6 +59,18 @@ const config = {
5959
customCss: ['./src/scss/app.scss'],
6060
// customCss: ['./src/css/custom.css']
6161
},
62+
sitemap: {
63+
lastmod: 'date',
64+
changefreq: 'weekly',
65+
priority: 0.5,
66+
ignorePatterns: ['/tags/**'],
67+
filename: 'sitemap.xml',
68+
createSitemapItems: async (params) => {
69+
const {defaultCreateSitemapItems, ...rest} = params;
70+
const items = await defaultCreateSitemapItems(rest);
71+
return items.filter((item) => !item.url.includes('/page/'));
72+
},
73+
},
6274
}),
6375
],
6476
],
@@ -156,14 +168,46 @@ const config = {
156168
x: 'https://twitter.com/rootstock_io',
157169
telegram: 'https://t.me/rskofficialcommunity'
158170
},
159-
tagline:{
160-
text1 : 'Build',
161-
text2 : 'Together',
171+
tagline: {
172+
text1: 'Build',
173+
text2: 'Together',
162174
},
163175
prism: {
164176
theme: prismThemes.github,
165177
darkTheme: prismThemes.dracula,
166178
},
179+
algolia: {
180+
// The application ID provided by Algolia
181+
appId: 'WAFPQL14PU',
182+
183+
// Public API key: it is safe to commit it
184+
apiKey: 'a934b35466d2bd24cf1a27a859fc4401',
185+
186+
indexName: 'dev-rootstock',
187+
188+
// Optional: see doc section below
189+
contextualSearch: true,
190+
191+
// Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
192+
//externalUrlRegex: 'external\\.com|domain\\.com',
193+
194+
// Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs
195+
// replaceSearchResultPathname: {
196+
// from: '/docs/', // or as RegExp: /\/docs\//
197+
// to: '/',
198+
// },
199+
200+
// // Optional: Algolia search parameters
201+
// searchParameters: {},
202+
//
203+
// // Optional: path for search page that enabled by default (`false` to disable it)
204+
// searchPagePath: 'search',
205+
//
206+
// // Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
207+
// insights: false,
208+
209+
//... other Algolia params
210+
},
167211
}),
168212
};
169213

0 commit comments

Comments
 (0)