Comments (7)
How to do that?
I'm trying by those commands without effects:
- npm run build
- yarn run build
Unfortunately, my search bar is saying:
from docusaurus-search-local.
yarn build
to build the static siteyarn run serve
to serve the static site
I have the searchbar working locally with this.
from docusaurus-search-local.
Currently, yes, it requires build.
from docusaurus-search-local.
OK, I found a solution.
docusaurus-search-local is a fork of docusaurus-search-local there we can find info: "Search does not work in development (i.e., when running yarn start)." >> https://github.com/cmfcmf/docusaurus-search-local
So, if you want run a search, you can:
- npm run build
- after this command you should have new folder "build" in your app
- rebiuld your app with "RUN_MODE=production" - this is necessary to run search properly.
In my example, I am using docusaurus app on image: awesometic/docusaurus. The proper setup to re-run container is like this:
docker run -d --name=docusaurus
-p 80:80
-v /config/dir:/docusaurus
-e TARGET_UID=1000
-e TARGET_GID=1000
-e AUTO_UPDATE=true
-e WEBSITE_NAME="awesometic-docs"
-e TEMPLATE=classic
-e RUN_MODE=production
awesometic/docusaurus
I hope this could help someone in the future.
from docusaurus-search-local.
I'm trying by those commands without effects:
- npm run build
- yarn run build
The command you were looking for is yarn build
.
from docusaurus-search-local.
@Anthony-Gaudino all local search plugins needs to be build.
The sites need to be scanned first and an index being build. This is a given no matter what type of search you have. The only difference between local and online search engines is, that they do this asynchronously. But usually results are not available immediately.
from docusaurus-search-local.
In my case the search is showing no results. I followed the steps below:
DEBUG=search-local:* npm run build
npm run serve
Now, the search bar is also visible and the search-index.json
file is also generated within the build
folder but when I type something it always shows No results.
The DEBUG logs are also not showing any errors.
from docusaurus-search-local.
Related Issues (20)
- After build "Couldn't Found search-index.json" error shows. HOT 10
- Question: is it possible to ignore a folder? HOT 2
- [Question] Independent extract search feature into another website
- pnpm build: Docusaurus server-side rendering could not render static page with path
- How to solve the type checking error in vscode? HOT 2
- I'm not able to swizzle the Search component. HOT 1
- Option to use custom icon for search HOT 3
- build fail when add slug: filename.html
- Search icon doesn't change color between light/dark mode HOT 1
- Allow Search to open details html tag
- Japanese search problem
- Add theme option to set the search bar placeholder message
- Docusaurus `tags` make search results incorrect and unreadable
- [Bug] - CI Fails when Used with Docusaurus 2.4.0
- `blogDir` allows `[]`
- No index entry generated for custom categories specified in sidebars.js
- Should search find documents based on front-matter keywords? HOT 1
- Support for Docusaurus 3.0 HOT 6
- Add support for newer languages
- Enable prebuild indexing
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.