https://utensil.github.io/forest/
This forest is initialized with the following command:
brew install opam bubblewrap watchexec
opam init --auto-setup --yes
opam update --yes
opam install forester --yes
forester --version
cd ~/projects/
git init forest
cd forest
git pull https://git.sr.ht/~jonsterling/forest-template
git remote add origin https://github.com/utensil/forest.git
git branch -M main
git push -u origin main
To initialize theme
directory, review and run ./thm.sh
.
Add a forest.toml
, then:
forester new --dest=trees --prefix=uts
Run ./dev.sh
to watch the modified files and serve them to be browsed.
Then open http://localhost:1314
in your browser.
./dev.sh
internally run ./build.sh
to build the forest and its dependencies. ./build.sh
is also used in CI, check out .github/workflows/gh-pages.yml
for more details.
If something goes wrong, check out https://github.com/jonsterling/forest .
Locally I will
git clone https://git.sr.ht/~jonsterling/public-trees jms
so I can check Jon Sterling's use of Forester conveniently.
In order to use dvisvgm
required by forester to compile LaTeX to SVG, I have to:
brew uninstall texlive
brew install --cask mactex
See https://tex.stackexchange.com/a/676179/75671 for why.
I'm experimenting with authoring js/ts/jsx/tsx
using bun, so I also need to run
curl -fsSL https://bun.sh/install | bash
source ~/.zshrc # or ~/.bashrc
to install bun
.
Rendering js/ts/jsx/tsx
are also done by dev.sh
in development with watch support or build.sh
in CI. Manually this is:
bun build ./bun/<file-name> --outdir output
To use any package, just figure out the package name from the import and run bun install <package-name>
, package.json
will be updated by bun
.
I'm also experimenting with WebAssembly, and some of the JS/TS code will rely on WASM.
As long as one has working bun
and rustup, the build.sh
should take care of the rest.
See REUSE.md for details.