Skip to content

Commit

Permalink
feat: add algolia theme and account
Browse files Browse the repository at this point in the history
  • Loading branch information
davidzwa committed Jan 25, 2024
1 parent d60cb12 commit 5797d4b
Show file tree
Hide file tree
Showing 3 changed files with 437 additions and 99 deletions.
25 changes: 23 additions & 2 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,29 @@ const config: Config = {
],

themeConfig:

{
algolia: {
// The application ID provided by Algolia
appId: "6KPHKLDLA1",
// Public API key: it is safe to commit it
apiKey: "a068613f6dec6a6efd597fa892088ba4",
indexName: "Docs V1",
// Optional: see doc section below
contextualSearch: true,
// 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.
externalUrlRegex: "docs.fdm-monster\\.net|fdm-monster\\.net",
// 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
replaceSearchResultPathname: {
from: "/docs/", // or as RegExp: /\/docs\//
to: "/"
},
// Optional: Algolia search parameters
searchParameters: {},
// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: "search"
//... other Algolia params
},

// Replace with your project's social card
image: "img/docusaurus-social-card.jpg",
navbar: {
Expand Down Expand Up @@ -127,7 +148,7 @@ const config: Config = {
colorMode: {
// Let the system decide with 'respectPrefersColorScheme' below
// defaultMode: 'dark',
respectPrefersColorScheme: true,
respectPrefersColorScheme: true
},
theme: prismThemes.github,
darkTheme: prismThemes.dracula
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "^3.0.1",
"@docusaurus/preset-classic": "^3.0.1",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
"@docusaurus/core": "3.0.1",
"@docusaurus/preset-classic": "3.0.1",
"@docusaurus/theme-search-algolia": "3.1.0",
"@mdx-js/react": "3.0.0",
"clsx": "2.0.0",
"prism-react-renderer": "2.3.0",
"react": "18.0.0",
"react-dom": "18.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.1.0",
Expand Down
Loading

0 comments on commit 5797d4b

Please sign in to comment.