Comments (2)
Update: I referenced another comment and was able to get the searchbar and search page to display
However, it doesn't appear to be functioning/working? Typing anything into the search only displays the loading loop
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
// With JSDoc @type annotations, IDEs can provide config autocompletion
/** @type {import('@docusaurus/types').DocusaurusConfig} */
const config = {
title: 'My Site',
tagline: 'Dinosaurs are cool',
url: 'https://your-docusaurus-test-site.com',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'facebook', // Usually your GitHub org/user name.
projectName: 'docusaurus', // Usually your repo name.
presets: [
[
'@docusaurus/preset-classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl: 'https://github.com/facebook/docusaurus/edit/main/website/',
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
'https://github.com/facebook/docusaurus/edit/main/website/blog/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'My Site',
logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'doc',
docId: 'intro',
position: 'left',
label: 'Tutorial',
},
{to: '/blog', label: 'Blog', position: 'left'},
{
href: 'https://github.com/facebook/docusaurus',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Tutorial',
to: '/docs/intro',
},
],
},
{
title: 'Community',
items: [
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
},
{
label: 'Discord',
href: 'https://discordapp.com/invite/docusaurus',
},
{
label: 'Twitter',
href: 'https://twitter.com/docusaurus',
},
],
},
{
title: 'More',
items: [
{
label: 'Blog',
to: '/blog',
},
{
label: 'GitHub',
href: 'https://github.com/facebook/docusaurus',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
themes: [
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
// ... Your options.
// `hashed` is recommended as long-term-cache of index file is possible.
hashed: true,
indexBlog: false,
docsRouteBasePath: "/",
highlightSearchTermsOnTargetPage: true,
explicitSearchResultPath: true,
// For Docs using Chinese, The `language` is recommended to set to:
// ```
language: ["en"],
// ```
},
],
],
};
module.exports = config;
from docusaurus-search-local.
This is the only error I can see after running the rebuild, which at least results in displaying the search bar
Unable to build website for locale "en".
TypeError: Cannot read properties of undefined (reading 'substr')
at processDocInfos (/app/WEBSITE/node_modules/@easyops-cn/docusaurus-search-local/dist/server/server/utils/processDocInfos.js:18:50)
at Object.<anonymous> (/app/WEBSITE/node_modules/@easyops-cn/docusaurus-search-local/dist/server/server/utils/postBuildFactory.js:17:64)
at Generator.next (<anonymous>)
at /app/WEBSITE/node_modules/tslib/tslib.js:169:75
at new Promise (<anonymous>)
at Object.__awaiter (/app/WEBSITE/node_modules/tslib/tslib.js:165:16)
at Object.postBuild (/app/WEBSITE/node_modules/@easyops-cn/docusaurus-search-local/dist/server/server/utils/postBuildFactory.js:15:24)
at /app/WEBSITE/node_modules/@docusaurus/core/lib/commands/build.js:158:22
at Array.map (<anonymous>)
at buildLocale (/app/WEBSITE/node_modules/@docusaurus/core/lib/commands/build.js:154:31)
at async tryToBuildLocale (/app/WEBSITE/node_modules/@docusaurus/core/lib/commands/build.js:32:20)
at async Object.mapAsyncSequencial (/app/WEBSITE/node_modules/@docusaurus/utils/lib/index.js:263:24)
at async build (/app/WEBSITE/node_modules/@docusaurus/core/lib/commands/build.js:68:25)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn run v1.22.19
from docusaurus-search-local.
Related Issues (20)
- removeDefaultStemmer option does not seems to work HOT 4
- ع
- Error: Cannot mix different versions of joi schemas with Docusaurus 2.4.1 HOT 3
- pages index HOT 3
- Building index in the development environment HOT 2
- Index url
- (excluding results) Excluding results isn't working HOT 1
- Error: ENOENT: no such file or directory, open 'xxx\build\docs\v1\search-index-docs.json HOT 3
- Help about Intersecting searchContextByPaths HOT 1
- Invalid search result url with docusaurus 3.4.0 HOT 8
- Conditional search HOT 4
- No search results in localsearch. The search animation is on loop. HOT 3
- Search By Keywords matches multiple keywords as a single string HOT 1
- Duplicate URLs for search results HOT 2
- Going to search results on headings seems to add the path twice HOT 1
- Issues with RTL languages HOT 7
- Contextual results are missing their context description HOT 3
- Insufficient contrast on highlighted suggestion HOT 5
- Customize search bar board colour HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docusaurus-search-local.