The documentation site for @push-based/lighthouse-soft-navigation, built with Angular and prerendered to static HTML for GitHub Pages.
pnpm nx serve docs
Opens a dev server with hot reload on http://localhost:4300.
pnpm nx build docs
Produces a fully prerendered site in dist/packages/docs/browser with /lighthouse-soft-navigation/ as base href, ready for GitHub Pages. Use --configuration=development for a build with / as base href.
Pages are Markdown files under src/content/<section>/<page>.md. Register a page in src/app/docs/nav.ts to give it a route, a title and a description; the sidebar, the start page, prerendering and the previous/next links all derive from that list.
Pages start with their first paragraph: the page title and description come from nav.ts.
Markdown extras:
- Fenced code blocks are highlighted. Add a file name with
```js title="flow.mjs". > [!TIP],> [!NOTE],> [!IMPORTANT]and> [!WARNING]block quotes render as callouts.- Links that start with
/docs/are in-app links and are rewritten for the base href. Other links that start with/point to files inpublic, are rewritten for the base href and open in a new tab. - Images live in
public/imagesand are referenced asimages/<file>. <!-- diagram: name -->draws one of the inline diagrams fromsrc/app/docs/diagrams.ts, and<!-- cta -->adds the install call to action.
The site follows the system colour scheme and offers a toggle in the header; the choice is stored in localStorage. Colours come from the push-based design tokens in src/tokens.scss, mapped to semantic roles with light and dark values in src/styles.scss. Use the semantic roles (--surface, --text, --border, --accent, ...) in components, never the raw --color-* ramps.
node packages/docs/scripts/og-image.mjs renders public/og-image.png from an HTML version of the landing page hero. Run it after changing the hero's look.
The mark in public/images/mark.svg, the favicon and the touch icon are the user-flow ones.
node packages/docs/scripts/example-report.mjs renders public/examples/soft-navigation-flow.html, the flow report linked from the results guide, by measuring the single page app of the e2e fixtures. Build the package first with pnpm nx build lighthouse-soft-navigation. Run it after a change to what the package reports.
.github/workflows/docs.yml builds and deploys the site on every push to main that touches the docs. The site is served at https://push-based.github.io/lighthouse-soft-navigation/. The repository's Pages source must be set to "GitHub Actions".