Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,31 @@ const config: Config = {
mermaid: true,
},
themes: ['@docusaurus/theme-mermaid'],

// Add plugins section
plugins: [
[
'@easyops-cn/docusaurus-search-local',
{
// Whether to enable index docs pages
docsRouteBasePath: ['docs'],
// Whether to enable index blog pages
blogRouteBasePath: ['blog'],
// `hashed` is recommended as long-term-cache of index file
hashed: true,
// For Docs using Chinese, The `language` is recommended to set to:
// ```
// language: ["en", "zh"],
// ```
language: ['en'],
// Highlight search terms on target page
highlightSearchTermsOnTargetPage: true,
// Explicit search result path for linking to pages
explicitSearchResultPath: true,
},
],
],

// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
Expand Down Expand Up @@ -65,6 +90,14 @@ const config: Config = {
],

themeConfig: {
algolia: {
appId: '',
apiKey: '',
indexName: '',
contextualSearch: true,
searchParameters: {},
searchPagePath: 'algolia-search',
},
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
docs: {
Expand Down Expand Up @@ -115,11 +148,19 @@ const config: Config = {
},
],
},
{
type: 'search',
position: 'right',
},
{
href: 'https://github.com/souvikpramanikgit/LearnHub',
label: 'GitHub',
position: 'right',
},
{
type: 'search',
position: 'right',
},
],
},
footer: {
Expand Down Expand Up @@ -166,4 +207,4 @@ const config: Config = {
} satisfies Preset.ThemeConfig,
};

export default config;
export default config;
Loading