Source code for the specifications of Willow.
The specs are written using Macromania (basic tutorial here), see this Macromania demo repository to learn about most of the macros used for this site.
For working on the generated site, run deno task watch to rebuild the site on (most) changes to the source; build output is placed at ./build. Run deno task serve to start a webserver at localhost:8000 for seeing the effects of your changes. The deno task watch command detects changes to input .ts and .tsx files only, but not to assets such as images or stylesheets. When changing those, simply interrupt the current deno task watch command and run it again (the command always starts with a full rebuild).
The entrypoint for macromania and the macromania expression that gets evaluated to produce the site is in [src/main.tsx]. Toward the end of that expression, we list the directory hierarchy of the website. The actual site contents are imported from hierarchically organised files in [src/pages]. Note how pages that have "subpages" (e.g. src/specs.tsx, src/more.tsx) are not mappend in a <Dir> macro, but "leaf pages" (e.g. src/specs/data_model.tsx) are. When in doubt, simply copypaste src/specs/data_model.tsx to get started with a new page.
Assets are read from [src/assets]. Careful: [src/assets/layout.css] is actually autogenerated from [src/layoutStyles.tsx] at build time, and then copied from the assets directory into the build directory. It turned out to be less effort to do this way, even it breaks the reasonable assumption of assets being purely static. Oh well. If you need to modify the responsive layout of marginales, tables of contents, etc, do so in [src/layoutStyles.tsx]. Also, ideally, you shouldn't need to.
The most common macros we use are those from the scientific writing demo repository. Consult [src/specs/data_model.tsx] for usage examples of most of them. That file also demonstrates the macro we use for rendering paths.
For example usage of the macro(s) for defining encodings, see [src/specs/encodings.tsx].
In general, willow-specific macros are defined in [src/macros.tsx]. Usually, that's where you'll want to add new macros as well.
The macro that serves as a general page template is defined in [src/pageTemplate.tsx].