Skip to content

Documentation

The source code of the Tenzir documentation is at https://github.com/tenzir/docs. We use Astro with Starlight as our site framework.

CommandAction
pnpm installInstall dependencies
pnpm devStart local dev server at localhost:4321
pnpm buildBuild production site to ./dist/
pnpm previewPreview build locally before deploying
CommandAction
pnpm lint:markdownLint all Markdown files
pnpm lint:linkcheckValidate all internal and external links
pnpm lint:prettierCheck code formatting
pnpm astro ...Run CLI commands like astro add, astro check
pnpm astro -- --helpGet help using the Astro CLI

For anything beyond editing Markdown content, check out Starlight’s docs or read Astro’s documentation.

For git workflow, branching strategy, and commit message conventions, see our Git and GitHub Workflow guide.

  1. Clone the repository:

    Terminal window
    git clone https://github.com/tenzir/docs.git
    cd docs
  2. Install dependencies:

    Terminal window
    pnpm install
  3. Start development server:

    Terminal window
    pnpm dev
  4. View the site: Browse to http://localhost:4321/

The development server includes:

  • 🔥 Hot module reloading for instant updates
  • 📝 Live Markdown rendering
  • 🔍 Error reporting in the browser

Create and preview a production build:

Terminal window
# Build the site
pnpm build
# Preview the build
pnpm preview

Then browse to http://localhost:4321/ to view the production site.

The documentation includes automated link validation to ensure all internal and external links work correctly:

Before submitting changes, run link checking locally to catch broken links:

Terminal window
pnpm lint:linkcheck

This will build the site with link validation enabled and report any broken links found.

Link checking runs automatically in our CI pipeline:

  • All builds: Link validation is enabled for production builds
  • Pull requests: Link checking runs as part of the lint workflow
  • Scheduled maintenance: Weekly link checks run every Sunday to catch broken external links

The link checker validates:

  • Internal page references (e.g., /guides/quickstart)
  • Anchor links within pages (e.g., /reference/operators#aggregate)
  • External URLs (with appropriate timeout and retry logic)
  • Relative links between documentation files

When the link checker finds issues:

  1. Invalid internal links: Update the link to point to the correct page path
  2. Missing anchor references: Ensure the target heading or element exists
  3. Broken external links: Update URLs or remove outdated references
  4. False positives: Add exclusions to the starlightLinksValidator configuration in astro.config.mjs

The link checker will cause builds to fail if broken links are detected, ensuring the documentation maintains high quality.

To keep the repository size manageable, always optimize image files before committing them. This is especially important for formats like PNG, which can contain unnecessary metadata or use inefficient compression.

We recommend using pngquant, a command-line utility for lossy compression of PNG files. It significantly reduces file size while preserving image quality.

To compress a PNG file in-place:

Terminal window
pngquant --ext .png --force --quality=65-80 image.png

Use jpegoptim, a utility for optimizing JPEGs without perceptible quality loss:

Terminal window
jpegoptim --strip-all --max=80 image.jpg

Alternatively, you can use mozjpeg for even better compression ratios.

Use svgo, a Node-based tool to optimize SVG files by removing unnecessary data:

Terminal window
svgo image.svg

This automatically rewrites the file in-place with redundant code removed and optimized structure.

Important: Some files in this repository are automatically updated by CI and should never be manually edited. Manual changes to these files will be overwritten the next time the update workflow runs.

The following files are synchronized from upstream repositories:

Tenzir Node Documentation:

  • src/content/docs/changelog/node is generated from individual changelog entries
  • src/content/docs/reference/functions is synced from tenzir/tenzir at docs/functions/
  • src/content/docs/reference/operators is synced from tenzir/tenzir at docs/operators/
  • src/content/docs/reference/functions.mdx is generated from individual function files
  • src/content/docs/reference/operators.mdx is generated from individual operator files
  • src/sidebar-reference.js is generated from individual function and operator files for programmatic sidebar navigation
  • src/content/apis/openapi.node.yaml is the API specification for Tenzir Node and generated from the node’s source code
  • tenzir.yaml.example is the node’s example configuration file

Tenzir Platform Documentation:

  • src/content/docs/changelog/platform is generated from individual changelog entries
  • src/content/docs/reference/platform-cli.mdx is synced from tenzir/platform at docs/platform-cli.mdx

If you need to update content in these files:

  1. For Functions/Operators: Make changes in the tenzir/tenzir repository
  2. For Platform CLI: Make changes in the tenzir/platform repository
  3. For generation logic: Modify the scripts in scripts/ or the update workflow

Our CI will automatically prevent pull requests that modify auto-updated files. If you encounter this error, revert your changes and make them in the appropriate upstream repository instead.

We use Excalidraw as primary tool to create sketches of architectural diagrams.

When exporting Excalidraw scenes, always use light mode and choose SVG as export format, as we have some CSS magic in place that automatically inverts colors SVGs so that they also look nicely when using dark mode.

Tenzir developers have access to our Excalidraw Documentation collection. For everyone else, please reach out to us on our Discord server to request changes to existing SVGs.

This section covers the editorial and technical standards for contributing to the Tenzir documentation.

We follow the Google Style Guide for clear and consistent technical documentation. Most notably:

  • Use active voice in general.
  • Avoid anthropomorphic language—don’t attribute human qualities to software or hardware.
  • Include definite and indefinite articles (a, an, and the) in your writing. Don’t skip articles for brevity, including in headings and titles.
  • In document titles and headings, use sentence case. Capitalize only the first word in the title, the first word in a subheading after a colon, and any proper nouns or other terms that are always capitalized a certain way.
  • Capitalize product names.
  • Write documentation in an informal tone—use common two-word contractions such as “you’re,” “don’t,” and “there’s.”
  • Define technical terms and acronyms on first use. Don’t assume readers know specialized vocabulary.
  • Put the most important information first. Don’t bury key details in the middle of paragraphs.
  • Use consistent terminology throughout. Don’t use different words for the same concept (e.g., don’t alternate between “node” and “instance”).
  • Avoid unclear pronouns like “it,” “this,” or “that” without clear antecedents. Be explicit about what you’re referring to.
  • Choose strong, specific verbs over weak ones. Use “use” instead of “utilize,” “help” instead of “facilitate,” and “show” instead of “demonstrate.”
  • Eliminate redundant phrases. Write “to” instead of “in order to,” “now” instead of “at this point in time,” and “because” instead of “due to the fact that.”
  • Avoid vague qualifiers like “simply,” “just,” “easily,” or “obviously.” These don’t add clarity and may frustrate readers who find the task difficult.
  • Provide context for why something matters. Don’t just explain what to do— explain when and why to do it.
  • Use hyperlinks judiciously. Link to external tools, products, or resources when first mentioned, but avoid overlinking within the same document.

Follow these conventions to maintain consistency across all documentation files.

  • Every file must end with a newline character, but avoid empty lines at the end of a file.
  • Break lines at 80 characters.
  • When editing Markdown, run pnpm lint:markdown:fix and pnpm lint:prettier:fix when you’re done.
  • Avoid empty lines within functions.
  • When editing source code (.js, .jsx, .ts, .tsx, .astro files), run pnpm lint:eslint:fix when you’re done.

Last updated: