Accommodate for faster documentation generation.

finite-set-exercises
Joshua Potter 2023-05-14 10:51:30 -06:00
parent f699adb5f6
commit e34b08e633
2 changed files with 14 additions and 2 deletions

View File

@ -2,6 +2,13 @@ all:
@echo "Please specify a build target." @echo "Please specify a build target."
docs: docs:
-ls build/doc | \
grep -v -E 'Init|Lean|Mathlib' | \
xargs -I {} rm -r "build/doc/{}"
-./scripts/run_pdflatex.sh build > /dev/null
lake build Bookshelf:docs
docs!:
-rm -r build/doc -rm -r build/doc
-./scripts/run_pdflatex.sh build > /dev/null -./scripts/run_pdflatex.sh build > /dev/null
lake build Bookshelf:docs lake build Bookshelf:docs

View File

@ -21,10 +21,15 @@ allows generating PDFs and including them in the navbar. To generate
documentation and serve files locally, run the following: documentation and serve files locally, run the following:
```bash ```bash
> make docs > make docs[!]
> lake run server > lake run server
``` ```
This assumes you have `pdflatex` and `python3` available in your `$PATH`. To The `docs` build target avoids cleaning files that are expected to not change
often (e.g. `Lean`, `Init`, and `Mathlib` related content). If you've upgraded
Lean or Mathlib, run `make docs!` instead to generate documentation from
scratch.
Both assume you have `pdflatex` and `python3` available in your `$PATH`. To
change how the server behaves, refer to the `.env` file located in the root change how the server behaves, refer to the `.env` file located in the root
directory of this project. directory of this project.