Documentation site for the Aliensense NXS sensor co-processor. Built with Astro Starlight.
src/content/docs/— the site content: the landing page, getting-started, and the FAQ are authored in this repository.src/content/docs/reference/— machine-managed: the released specification set, mirrored from the firmware repository on every release. Do not edit these files here; fixes go to the firmware repository'sdocs/specs/and arrive with the next release.- The product pages (
hardware/product-description,hardware/datasheet,hub/*) and their images undersrc/assets/— machine-managed: rewritten from the marketing repository's sources by itsmarketing-mirrorworkflow on every merge. Do not edit these files here; fixes go toals-docsmarketing/and arrive on push. src/content/docs/guides/— machine-managed: the released guide set, mirrored from the firmware repository on every release. Do not edit these files here; fixes go to the firmware repository'sdocs/guides/and arrive with the next release.- The product pages (
hardware/product-description,hardware/datasheet,hub/*) and their images undersrc/assets/— machine-managed: rewritten from the marketing repository's sources by itsmarketing-mirrorworkflow on every merge. Do not edit these files here; fixes go toals-docsmarketing/and arrive on push. versions.json+src/content/docs/<tag>/+src/content/versions/— machine-managed: one frozen site version per published release, appended by the firmware repository's release-export workflow. The version picker comes from thestarlight-versionsplugin.
- Images live under
src/assets/, never insidesrc/content/docs/— the version snapshotter parses every file in the content tree as Markdown/MDX and dies on binary data. - No HTML comments (
<!-- -->) and no<https://…>angle-bracket autolinks in content — the snapshotter's parser is MDX-flavored and rejects both. Use[text](url)links; use≤/≥in prose, not<=/>=.
This section is written for technical writers who are new to command line tools. Follow the steps in order.
- Install required tools (one time).
- Open the project folder in a terminal.
- Run the docs site locally.
- Build the production version.
- Preview and verify before sharing changes.
- Go to https://nodejs.org/.
- Download the LTS version for Windows.
- Run the installer and keep default options.
- Restart your computer after install (recommended).
If you update from GitHub regularly, install Git for Windows:
- Go to https://git-scm.com/download/win.
- Install with default options.
If someone already gave you the project folder as a ZIP, Git is optional.
- Go to https://code.visualstudio.com/.
- Install with default options.
You can edit files in any editor, but VS Code is easiest for Markdown docs.
If you already have the nxs-docs folder, continue.
If not, either:
- Clone it from GitHub, or
- Download ZIP and extract it.
Then open a terminal in that folder:
- Open File Explorer.
- Open the
nxs-docsfolder. - Click the address bar at the top.
- Type
cmdand press Enter.
A Command Prompt opens already in the correct folder.
In Command Prompt, run:
node -v
npm -vYou should see version numbers for both commands.
If you get "not recognized", see Troubleshooting.
Run this once (or after pulling changes):
npm installThe reference and guide pages carry their diagrams as D2 fences, which the build renders with the D2 binary. Install it once: brew install d2 on macOS, or the installer at https://d2lang.com/tour/install for Windows and Linux.
This may take a few minutes the first time.
Start the development server:
npm run devThen open:
What to expect:
- The docs site opens in your browser.
- Changes you save in Markdown files update automatically.
To stop the server:
- Press
Ctrl + Cin Command Prompt.
This checks that the site can build successfully for deployment:
npm run buildSuccess looks like:
- Command finishes without errors.
- Final lines include
buildcomplete. - A
distfolder is created/updated.
After a successful build, run:
npm run previewThen open the URL printed in terminal (commonly http://localhost:4321 or http://localhost:4322).
This preview is closer to what users will see in production.
Stop preview with Ctrl + C.
- Run
npm run buildwith no errors. - Open the homepage and at least one page in each section.
- Verify links you edited open correctly.
- Verify any images you added render correctly.
- Test search for a unique term from your new content.
- Run
npm run previewand spot-check formatting one more time.
- Docs pages:
src/content/docs/ - Diagrams/images:
src/assets/diagrams/ - Sidebar navigation:
astro.config.mjs - Theme/style:
src/styles/global.css
Markdown/MDX pages use frontmatter like:
---
title: Your Page Title
description: Brief summary shown in metadata.
---Image example:
- Close all Command Prompt windows.
- Reopen Command Prompt and try again.
- If still failing, reinstall Node.js LTS and restart Windows.
Run dev on another port:
npm run dev -- --port 4325Then open http://localhost:4325.
Stop the server (Ctrl + C), then run:
rmdir /s /q .astro
rmdir /s /q dist
npm run dev -- --force- Confirm internet/VPN connection.
- Close terminal and open a new Command Prompt.
- Try again.
- If your company uses a proxy, ask IT for npm proxy settings.
The site is a pure function of two branches:
mainbuilds to the site root.staging(when it exists) builds under/staging/on the same site.
The firmware repository's release-export workflow pushes rc releases
to staging and full releases to main (deleting staging), so
publishing an rc stages the future site at
https://aliensense.github.io/nxs-docs/staging/ and publishing the full
release makes it live. Pull requests build only (downloadable
pr-preview-dist artifact) and never deploy.
src/content/docs/ -> Documentation pages (Markdown / MDX)
src/assets/ -> Images and diagrams
src/styles/global.css -> Theme customizations
astro.config.mjs -> Starlight + site configuration
public/ -> Static assets (favicon, robots.txt)