Skip to content

Commit

Permalink
feat(website-search): add document search (lunr.js) support
Browse files Browse the repository at this point in the history
  • Loading branch information
sabertazimi committed Aug 22, 2021
1 parent 7d26554 commit aa196cb
Show file tree
Hide file tree
Showing 3 changed files with 1,140 additions and 18 deletions.
50 changes: 32 additions & 18 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,38 @@ module.exports = {
favicon: 'img/logo.svg',
organizationName: 'sabertazimi',
projectName: 'awesome-notes',
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
path: 'notes',
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/sabertazimi/awesome-notes/edit/main/',
showLastUpdateAuthor: true,
showLastUpdateTime: true,
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
plugins: [
[
require.resolve('@easyops-cn/docusaurus-search-local'),
{
indexDocs: true,
indexBlog: false,
indexPages: false,
docsDir: "notes",
docsRouteBasePath: "/",
language: ["en", "zh"],
hashed: true,
},
],
],
themeConfig: {
respectPrefersColorScheme: true,
hideableSidebar: true,
Expand Down Expand Up @@ -214,22 +246,4 @@ module.exports = {
],
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
path: 'notes',
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/sabertazimi/awesome-notes/edit/main/',
showLastUpdateAuthor: true,
showLastUpdateTime: true,
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
};
Loading

0 comments on commit aa196cb

Please sign in to comment.