Skip to content

Commit

Permalink
feat: docsearch (#41)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Mar 22, 2022
1 parent d010d08 commit e9fb704
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docsearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Docsearch
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 4 * * 1'

Expand Down
20 changes: 17 additions & 3 deletions docsearch.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,25 @@
"lvl6": "article h6",
"text": "article p, article li, article td:last-child"
},
"strip_chars": " .,;:#",
"stop_urls": [],
"strip_chars": " .,;:#",
"custom_settings": {
"separatorsToIndex": "_",
"attributesForFaceting": ["language", "version", "type", "docusaurus_tag"],
"attributesToRetrieve": ["hierarchy", "content", "anchor", "url", "url_without_anchor", "type"]
}
"attributesToRetrieve": [
"hierarchy",
"hierarchy.lvl0",
"hierarchy.lvl1",
"hierarchy.lvl2",
"hierarchy.lvl3",
"hierarchy.lvl4",
"hierarchy.lvl5",
"hierarchy.lvl6",
"content",
"url",
"type"
]
},
"scrap_start_urls": false,
"nb_hits": "OUTPUT OF THE CRAWL"
}
14 changes: 9 additions & 5 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
algolia: {
apiKey: '3ea338c2dd7e413e35e4075a48707fcb',
appId: '50KU9JDRGZ',
indexName: 'd7y.io',
contextualSearch: true,
algoliaOptions: {
hitsPerPage: 10,
},
},
navbar: {
title: 'Dragonfly',
logo: {
Expand Down Expand Up @@ -88,11 +97,6 @@ const config = {
},
],
},
algolia: {
apiKey: '3ea338c2dd7e413e35e4075a48707fcb',
appId: '50KU9JDRGZ',
indexName: 'd7y.io',
},
footer: {
style: 'dark',
links: [
Expand Down

0 comments on commit e9fb704

Please sign in to comment.