Skip to content

Commit 5332243

Browse files
Merge pull request #105 from tp2750/build_locally_2025-07-13
Add section on lunr search.
2 parents 6dc44bd + 88a884d commit 5332243

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

docs/contributing.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,30 @@ If you enter that folder (`cd JuliaPackageComparisons.github.io`), you can now o
5959

6060
```bash
6161
cd JuliaPackageComparisons.github.io/docs
62-
julia --project=. -e 'using Pkg; Pkg.instantiate(); using Franklin; lunr(); serve()'
62+
julia --project=. -e 'using Pkg; Pkg.instantiate(); using Franklin; serve()'
6363
```
6464

6565
You default browser should open a new tab at `http://localhost:8000/`, showing the locally hosted page.
6666
Changes you make to the content will be automatically detected, and the generated page will be updated in real-time as you run the above command.
6767
After having made the changes you want, you can commit you changes, push them to github, and then use the GitHub web page to open up a pull-request to make you changes in the original repository.
6868
Relevant git commands are `git commit` and `git push`, but if that is also new to you, you should probably google how to use git (a version control system) and GitHub (a website and hosting service) first.
6969

70+
#### Lunr search
71+
To also run the `lunr` based search locally, you need to have `npm` and `nodejs` installed as well as the `npm` packages `lunr` and `cheerio`. See [Franklin.jl docs](https://franklinjl.org/extras/lunr/index.html#add_search_with_lunr):
72+
73+
```bash
74+
> sudo install npm # installs 387 packages!
75+
> npm install lunr
76+
> npm install cheerio
77+
```
78+
79+
Then serve the site locally with `lunr`:
80+
81+
```bash
82+
cd JuliaPackageComparisons.github.io/docs
83+
julia --project=. -e 'using Pkg; Pkg.instantiate(); using Franklin; lunr(); serve()'
84+
```
85+
7086
### Update existing content
7187
TODO: write guide
7288

0 commit comments

Comments
 (0)