Chuyển đến nội dung

Documentation Site

Nội dung này chưa có trong Tiếng Việt

This page “documents” this “documentation site” itself.

The repo of this doc site is here and it’s open to contribution.

Development

Currently, this project is based on Starlight, which is based on Astro.

The website is hosted on GitHub Pages using a workflow for GitHub Actions.

The workflow is triggered when a push involves changing under following paths:

  • src/
  • public/

It can also be triggered manually.

Run Locally

CommandAction
npm installInstalls dependencies
npm run devStarts local dev server at localhost:4321
npm run buildBuild your production site to ./dist/
npm run previewPreview your build locally, before deploying
npm run astro ...Run CLI commands like astro add, astro check
npm run astro -- --helpGet help using the Astro CLI

How to

Edit/add pages

Edit markdown files under src/content/docs/en/ .

  • Update the value of lastUpdated in frontmatter manually, e.g. lastUpdated: 2024-02-10.
  • Somehow different to the markdown on GitHub. Reference.
  • After editing, apply notification for other languages about the source file (English) has updated. To achive this, use the script l10n-notify, which syntax is:
Terminal window
./l10n-notify <file1> [file2] ...

This script is not perfect yet, but it’s robust and idempotent.

Misc

  • Publish HTML files: Put it under src/pages.

  • Edit sidebar: Edit astro.config.mjs.

  • Edit theme: Edit src/styles/custom.css (Reference).

  • Edit homepage: Edit src/content/docs/en/index.mdx

References

History

This doc site started from dots-hyprland#246 and was then initialized mainly by @clsty with contents from the README and built-in wiki of dots-hyprland and the README of dots-hyprarch.