We appreciate your interest in improving NAHPU documentation. Several ways you can help:
- Update existing docs: Fix errors or add new information to current pages
- Create new content: Write new pages or sections on topics we haven't covered yet
- Translate docs: Help us reach more people by reviewing our translations or adding a new language
Updating Existing Docs
Sección titulada «Updating Existing Docs»Team Members
Sección titulada «Team Members»At the bottom of each page on the website, you will find an Edit page link. Click on this link to open the page in GitHub. Here are the steps to do it:
Check if you have been added as a collaborator.
Go to GitHub repository and navigate to Settings → Collaborators. If you do not see your username listed, reach out to a NAHPU team member to request access.
Click the
Edit pagelink at the bottom of the page.This will open the file directly in the GitHub web editor.
Start by making small changes.
If you are new to the project, begin with minor fixes such as typos, grammar corrections, or broken links before tackling larger edits.
We use the Markdoc format for our documentation. This format is similar to Markdown but with additional features for documentation. It is designed to be easy for non-technical contributors to write, while providing the flexibility to style the writing.
Consider the following when making changes:
- Any text enclosed with
{% text %}is a Starlight component. It is sensitive to spaces. - You can use the component to style your writing. Learn more below.
- Any text enclosed with
Commit your changes.
GitHub will prompt you to write a commit message. Keep it concise, descriptive, and start with an active verb. Example of a good message:
Fix typos in the mammalian measurements.Select a commit option.
- Commit directly to the
releasebranch — preferred if you have collaborator access and the change is minor. - Create a new branch and open a pull request — use this if direct commit fails or if your change is significant and needs review.
- Commit directly to the
Check your changes.
After committing, navigate to the Actions tab in the GitHub repository to monitor the build. Wait for the workflow to complete. A green checkmark indicates a successful deployment. Once the build is done, visit the page where you made your changes on the live site to verify everything looks correct.
Make more changes.
Repeat steps 2–6 for any additional edits. For larger contributions involving multiple pages or new sections, consider cloning the repository locally for a more efficient workflow.
External Contributors
Sección titulada «External Contributors»If you are not a team member, you can still contribute to the project. Here's how:
Fork the documentation repository on GitHub, then clone it to your local machine.
Ventana de terminal git clone https://github.com/nahpu/nahpu-docs.gitVentana de terminal gh repo clone nahpu/nahpu-docsNavigate into the project directory.
Ventana de terminal cd nahpu-docsCreate a new branch for your changes.
Ventana de terminal git checkout -b your-branch-nameMake your changes to the documentation.
Files are located in
src/content/docs/[language].Commit and push your changes.
Ventana de terminal git add .git commit -m "Your commit message"git push origin your-branch-nameSubmit a pull request.
Go to the GitHub repository and open a pull request from your branch. A maintainer will review and merge your changes before the site is deployed.
Create New Content
Sección titulada «Create New Content»To create one or two pages, you can add a new file in the GitHub repository. The documentation files are inside src/content/docs/[language]. We need to add the English content first, then write translations for the other languages. We prefer the documentation in markdoc .mdoc format. However, you can start with plain Markdown and let the documentation maintainer do the rest.
Page Metadata
Sección titulada «Page Metadata»Add the page author and the date it was last updated to the frontmatter of new pages and substantially revised pages. Starlight displays this information in the page footer.
Use authors for one or more contributor names and lastUpdated for the date of the latest substantive update. Use the ISO date format YYYY-MM-DD:
---title: "Page title"authors: - Author NamelastUpdated: 2026-07-25---Add all contributors who authored or substantially revised the page. Update lastUpdated whenever the page receives a substantive content change.
For a more complex scenario with complex pages and rooting, see the Deep Dive section for more details.
Adding a New Language Translation
Sección titulada «Adding a New Language Translation»We're always looking for speakers of languages we don't currently support. To facilitate the addition of new languages, we use AI to assist with translations. If you're interested in contributing, please reach out to one of our team members. Our workflow for adding a new language involves:
- Creating a new language directory in the
src/content/docsfolder. The folder name follows the language code (e.g.,en,es,fr). - Using a large language model to translate the English documentation, following the Translation glossary.
- Adding the sidebar translations in the
astro.config.mjsfile. - Reviewing and revising the AI translation for accuracy by a team member.
- Adding the reviewer to the page's
authorsfront matter, which switches the page's translation notice from "check for accuracy" to the reviewed state.
Every page under a non-English locale carries an AI-assisted translation notice below its title. The notice is added automatically, so translators do not write it into the page. Pages that fall back to English, such as this Contributing section, do not show it.
Deep Dive
Sección titulada «Deep Dive»This section explains the advanced method to develop the NAHPU documentation.
Technologies
Sección titulada «Technologies»NAHPU documentation is built with the following technologies:
- Astro — Static site generator
- Starlight — Documentation theme for Astro
- Markdoc — Documentation format
- Tailwind CSS — Utility-first CSS framework
- Bun — JavaScript runtime and package manager
Why These Technologies?
Sección titulada «Why These Technologies?»Astro generates static HTML pages at build time, meaning the documentation site ships zero JavaScript by default. This results in fast page loads, low bandwidth usage, and a smaller carbon footprint. They are important values for the NAHPU project.
Starlight is Astro's official documentation theme. It provides out-of-the-box features essential for technical documentation, including full-text search, sidebar navigation, internationalization, and accessibility, without requiring us to build them from scratch.
Markdoc extends standard Markdown with a powerful, structured tag system. Unlike MDX, Markdoc keeps content and logic cleanly separated, making it easier for non-technical contributors to write and edit documentation without worrying about breaking component code. It also validates content at build time, catching errors early.
Tailwind CSS allows us to style custom pages and components using utility classes directly in markup, without writing separate CSS files. Its design token system ensures visual consistency across pages, and its built-in purging keeps the final stylesheet small.
Bun is a fast JavaScript runtime and package manager that replaces Node.js and npm in our development workflow. It is less finicky than Node.js and npm, and it installs dependencies significantly faster. It also runs build scripts with lower overhead, making local development and CI builds quicker for contributors.
Local Development
Sección titulada «Local Development»Prerequisites
Sección titulada «Prerequisites»Before setting up the documentation locally, make sure you have the following installed:
- Git
- Bun
- GitHub CLI (optional, but recommended)
- A code editor (e.g., VS Code)
Install Git.
Git comes pre-installed on macOS. Verify with:
Ventana de terminal git --versionIf not installed, install it via Homebrew:
Ventana de terminal brew install gitVentana de terminal # Debian/Ubuntusudo apt install git# Fedorasudo dnf install gitDownload and install Git from git-scm.com. During installation, keep the default options. Verify with:
Ventana de terminal git --versionInstall GitHub CLI (optional, but recommended).
Ventana de terminal brew install ghVentana de terminal # Debian/Ubuntusudo apt install gh# Fedorasudo dnf install ghVentana de terminal winget install --id GitHub.cliVerify the installation:
Ventana de terminal gh --versionAuthenticate GitHub CLI with your GitHub account.
Ventana de terminal gh auth loginFollow the prompts: select GitHub.com as the host, HTTPS as the protocol, and confirm when asked to authenticate via browser. Verify once complete:
Ventana de terminal gh auth statusConfigure Git with your name and email.
Ventana de terminal git config --global user.name "Your Name"git config --global user.email "your@email.com"Use the same email address associated with your GitHub account.
Install Bun.
Ventana de terminal curl -fsSL https://bun.com/install | bashVentana de terminal powershell -c "irm bun.sh/install.ps1 | iex"Verify the installation:
Ventana de terminal bun --versionClone the documentation repository.
Ventana de terminal git clone https://github.com/nahpu/nahpu-docs.gitVentana de terminal gh repo clone nahpu/nahpu-docsNavigate into the repository.
Ventana de terminal cd nahpu-docsVentana de terminal # PowerShell 7+cd nahpu-docs# Alternatively, use the full cmdletSet-Location nahpu-docsIf you are using VS Code, you can open it directly in the editor.
Ventana de terminal code nahpu-docsInstall all dependencies.
Ventana de terminal bun installMake your changes.
Documentation files are in
src/content/docs/[language]. Other pages are insrc/pages.
Directory structure
Sección titulada «Directory structure»Here's the directory structure and short description of each file/directory.
- astro.config.mjs Configuration for Astro site
- markdoc.config.mjs Configuration for Markdoc documentation
- package.json Project dependencies and scripts
- README.md Overview and instructions for the project
- tsconfig.json TypeScript configuration
Directoriopublic/ Static assets served directly
- …
Directoriosrc/ Main source code directory
- content.config.ts Content management configurationS
Directorioassets/ Media files like images
- …
Directoriocomponents/ Reusable UI components
- …
Directoriocontent/ Documentation files organized by language
- …
Directoriolayouts/ Layout components for reusable page template
- …
Directoriopages/ Main pages of the site
- …
Directoriostyles/ Global CSS stylesheets
- …
For more details about the directory structure, follow Astro guidelines and Starlight documentation.
Code Conventions
Sección titulada «Code Conventions»Markdoc Documentation Files
Sección titulada «Markdoc Documentation Files»Most contributors will work on .mdoc files inside src/content/docs/[language]. Follow these conventions when editing or creating documentation pages:
Use Markdoc syntax for all documentation files. Prefer
.mdocover plain.mdto take full advantage of custom tags and components.Use built-in Starlight components for common UI patterns such as asides, steps, tabs, and file trees. See Writing with Starlight Components for examples.
Keep frontmatter minimal. Only include fields required by the schema, such as
titleandsidebar:---title: "Page Title"sidebar:order: 1---
Astro and General Pages
Sección titulada «Astro and General Pages»These conventions apply to .astro files in src/components/, src/layouts/, and src/pages/:
If the same code snippet appears in multiple places, use a shared component to avoid duplication. Place shared components in
src/components/using PascalCase filenames, e.g.,SharedComponent.astro.Use layouts for reusable UI templates. Follow the same PascalCase naming convention and place them in
src/layouts/.Avoid vanilla CSS for styling whenever possible. Use Tailwind CSS instead. We use Tailwind v4.
Avoid writing many classes inline on elements. Instead, use a
cntlconst variable to store classes. Seesrc/pages/index.astrofor an example.
Writing with Starlight Components
Sección titulada «Writing with Starlight Components»When writing documentation, keep the following in mind:
- Use Starlight components for repeated documentation patterns.
- Use the
codecomponent whenever you need to show Markdoc component syntax as text. - Keep examples short and easy to copy.
- Prefer examples that match the NAHPU documentation workflow.
Built-in Components
Sección titulada «Built-in Components»You can include a tip box in your documentation using the aside component:
{% aside type='tip' %}This is a tip!{% /aside %}It will render as:
For showing numbered steps, you can use the steps component:
{% steps %}1. Step one2. Step two{% /steps %}It will render as:
- Step one
- Step two
You can find the full list of Starlight components in the Starlight documentation.
Adding New Components
Sección titulada «Adding New Components»Create a new component in
src/components/. Use PascalCase for the filename, e.g.,MyComponent.astro.src/components/MyComponent.astro <div>Your component content here</div>Register it as a Markdoc tag in
markdoc.config.mjs.import { defineMarkdocConfig, component } from "@astrojs/markdoc/config";import starlightMarkdoc from "@astrojs/starlight-markdoc";export default defineMarkdocConfig({extends: [starlightMarkdoc()],tags: {mycomponent: {render: component("./src/components/MyComponent.astro"),selfClosing: true,},},});Use it in any
.mdocfile.{% mycomponent / %}
Running the website locally
Sección titulada «Running the website locally»Run astro in dev mode
Ventana de terminal bun run devOpen your browser and navigate to
http://localhost:4321/to view the documentation website.