Skip to content

Building SEGUL Documentation

SEGUL documentation is built using Astro and Starlight, and deployed using Vercel. The documentation is written in Markdown and MDX. We use Bun to manage dependencies and run scripts.

Terminal window
gh repo clone hhandika/segui

Using git:

Terminal window
git clone https://github.com/hhandika/segui.git

Install Bun:

Terminal window
curl -fsSL https://bun.sh/install | bash

On Windows, use PowerShell:

Terminal window
powershell -c "irm bun.sh/install.ps1 | iex"

Change directory to the website folder:

Terminal window
cd segui/website

Install the website dependencies:

Terminal window
bun install

To run the website locally with hot reload, use the following command:

Terminal window
bun run dev

The website will be available at http://localhost:4321/.

Check types and build the static site into dist/:

Terminal window
bun run check
bun run build

Preview the production build locally:

Terminal window
bun run preview
  • src/content/docs/docs/: documentation pages. The folder structure maps to the URL, for example src/content/docs/docs/cli-usage/align-concat.md is served at /docs/cli-usage/align-concat/.
  • src/pages/: the landing (index.astro), get started, and about pages, styled with Tailwind. src/layouts/Layout.astro and src/components/Navbar.astro frame them.
  • src/data/site.ts: shared content for those pages, such as the tool list and citation.
  • src/components/: Astro components used by pages.
  • src/assets/ and public/: images and static files.
  • astro.config.mjs: site configuration, including the sidebar and redirects.

Each page needs a title in its frontmatter. Use sidebar.order to order pages within a sidebar group, and use Starlight asides (:::note, :::tip, :::caution, and :::danger) for callouts.