Restored search.rake

This commit is contained in:
Silvio Giebl
2020-06-18 22:39:58 +02:00
parent ed618caf70
commit 1cf7d5aba9
6 changed files with 105 additions and 2 deletions

View File

@@ -109,3 +109,17 @@ nav_exclude: true
search_exclude: true
---
```
## Generate search index when used as a gem
If you use Just the Docs as a remote theme, you do not need the following steps.
If you use the theme as a gem, you must initialize the search by running this `rake` command that comes with `just-the-docs`:
```bash
$ bundle exec just-the-docs rake search:init
```
This command creates the `assets/js/zzzz-search-data.json` file that Jekyll uses to create your search index.
Alternatively, you can create the file manually with [this content]({{ site.github.repository_url }}/blob/master/assets/js/zzzz-search-data.json).