Skip to main content

Writing docs

A quick reference for adding pages to this site, with links to the pages that use each feature. Delete this page once you're comfortable.

Add a page​

Create an .mdx file anywhere under docs/latest/core/. The sidebar updates automatically.

FileURL
docs/latest/core/intro.mdx (slug: /)/latest/core
docs/latest/core/reference/corefs.mdx/latest/core/reference/corefs

MDX is Markdown that can also import React components, like the tabs on Installation. Because of that, a bare < or { in normal text is read as code: put it in backticks, like <rootfs>.

Front matter​

The block at the top of a file controls how the page appears:

---
title: Deploying
sidebar_position: 3
sidebar_label: Deploy
description: Shown in search results and link previews.
---

Folders​

A folder becomes a sidebar category. Its _category_.json sets the label, position and an overview page listing its pages. See docs/latest/core/reference/_category_.json and the Reference page it produces.

Link to other pages by their file path, optionally with a heading anchor. The build fails on broken links, so typos are caught early:

See [install records](./concepts/filesystem-layout.mdx#install-records).

Features used in the example pages​

FeatureExample
TabsInstallation
Callouts (:::note, :::tip, :::warning, :::danger)Installation
Code block titles and highlighted linesPackages and repositories
Collapsible sections (<details>)FAQ
Tablescorefs
Keyboard keys (<kbd>)Try it in a directory

A highlighted code block looks like this in Markdown:

```text title="/etc/inittab" {1,3-4}
...
```