Documentation Guide
This guide defines the standards for all ADL documentation pages. Follow these conventions to keep the documentation consistent, maintainable, and easy to navigate.
Page Structureโ
Every documentation page follows the same general structure:
- Frontmatter --- metadata that controls sidebar placement and SEO
- Title heading --- a single
#heading matching the frontmatter title - Introduction --- one to three paragraphs explaining what the page covers and who it is for
- Body sections --- the main content, organized under
##headings - Cross-links --- links to related pages, usually in a "Next Steps" or "Related Pages" section at the bottom
Frontmatterโ
Every page must begin with YAML frontmatter:
---
sidebar_position: 1
title: "Your Page Title"
description: "A one-sentence description of what this page covers."
---
sidebar_positioncontrols the ordering within a sidebar category. Lower numbers appear first.titleis displayed in the sidebar and in browser tabs. Use sentence case.descriptionappears in search results and link previews. Keep it under 160 characters.
Title Headingโ
After the frontmatter, include a single # heading that matches the title field:
# Your Page Title
Do not use more than one # heading per page.
Introductionโ
Write one to three paragraphs that answer these questions:
- What does this page cover?
- Who is this page for?
- What will the reader be able to do after reading it?
Do not start the introduction with "This page..." every time. Vary your openings.
Component Usage Guideโ
ADL documentation uses custom MDX components. These are globally available --- you do not need to import them.
Warningโ
Use Warning for actions that could cause data loss, break a setup, or are difficult to reverse.
<Warning>Uninstalling Termux removes all Linux distributions and their data. Back up important files first.</Warning>
Tipโ
Use Tip for helpful shortcuts, time-savers, or non-obvious features.
<Tip>Long-press the Termux notification to access session controls without leaving your current app.</Tip>
Noteโ
Use Note for supplementary information that is relevant but not critical.
<Note>This feature was introduced in Termux version 0.118. Earlier versions do not support it.</Note>
BestPracticeโ
Use BestPractice for recommended approaches and patterns.
<BestPractice>Run apt update before installing any new package to ensure you get the latest version.</BestPractice>
CommonMistakeโ
Use CommonMistake for errors that readers frequently make.
<CommonMistake>Do not install Termux from the Google Play Store --- it is outdated. Use F-Droid or the GitHub releases page instead.</CommonMistake>
CopyCommandโ
Use CopyCommand for any command the reader should run. It renders a code block with a copy button.
<CopyCommand command="pkg install git -y" />
pkg install git -yAlways prefer CopyCommand over a plain fenced code block for executable commands. Reserve fenced code blocks for configuration files, code snippets, and output examples.
Terminalโ
Use Terminal to show a command alongside its expected output. This helps readers verify that a command worked correctly.
<Terminal command="proot-distro list" output="Installed:
ubuntu - Ubuntu 22.04" />
Requirementsโ
Use Requirements to present a checklist of prerequisites at the top of a guide.
<Requirements items={["Android 10 or later", "At least 4 GB of RAM", "2 GB of free storage"]} />
- Android 10 or later
- At least 4 GB of RAM
- 2 GB of free storage
DownloadCardโ
Use DownloadCard to present a downloadable app or resource with a clear call to action. These are typically used in the Downloads section.
FAQ and Troubleshootingโ
For FAQ sections, use standard Markdown headings with a question-and-answer structure. For troubleshooting pages, organize entries under ### headings named after the symptom, followed by Cause and Solution subheadings.
Command Documentation Patternโ
When documenting a command, follow this pattern:
- Briefly explain what the command does
- Show the command with
CopyCommand - Show the expected result with
Terminalor describe what the reader should see - Note any common errors with
CommonMistake
Example:
Update your package list to ensure you can install the latest versions:
<CopyCommand command="apt update && apt upgrade -y" />
<Terminal command="apt update" output="Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Reading package lists... Done" />
<CommonMistake>If you see "Permission denied," make sure you are inside the Ubuntu proot environment, not in the Termux shell.</CommonMistake>
Cross-Linking Rulesโ
Use Relative Pathsโ
Always use relative file paths for internal links, not absolute URLs:
<!-- Correct -->
See the [Architecture Overview](../learn/concepts/architecture.md) page.
<!-- Incorrect -->
See the [Architecture Overview](https://adl-docs.example.com/learn/concepts/architecture) page.
Relative paths are validated at build time. If a linked page is moved or deleted, the build will fail, alerting you to fix the link. Absolute URLs break silently.
Link Textโ
Write descriptive link text. Avoid "click here" or "this page."
<!-- Correct -->
Learn how to [install Ubuntu in proot](../installation/common/ubuntu-setup.md).
<!-- Incorrect -->
To install Ubuntu in proot, [click here](../installation/common/ubuntu-setup.md).
Linking to Sectionsโ
Link to specific sections using the heading's anchor:
See [Storage Permissions](../installation/common/termux-setup.md#storage-permissions).
Screenshot Standardsโ
When adding screenshots to documentation:
- Format: PNG only.
- Width: Maximum 1200 pixels wide. Resize larger images before adding them.
- Annotations: Use red rectangles or arrows to highlight relevant areas. Use a consistent annotation style.
- Alt text: Always include descriptive alt text for accessibility.
- File naming: Use lowercase, hyphen-separated names:
termux-storage-permission.png, notScreenshot_2024.png. - Location: Store screenshots in a
img/subdirectory alongside the page that uses them.
Example:

The Single-Source-of-Truth Principleโ
Define every concept, procedure, or configuration detail in exactly one place. Everywhere else, link to that canonical location.
Why This Mattersโ
When the same information appears on multiple pages, updates become error-prone. If you change the Termux installation steps on one page but forget the other three, readers get conflicting instructions.
How to Apply Itโ
- Procedures: Write the full steps on one page. On other pages, write a brief summary and link to the canonical page.
- Definitions: Define terms in the Glossary. Reference them rather than redefining them.
- Commands: If a command appears in multiple guides, document it fully in the relevant reference page and link to it from guides.
Exceptionโ
Brief reminders are acceptable when the reader needs context to continue. For example, a guide can say "Make sure you have completed the Termux setup before proceeding" without repeating the full setup instructions.
File and Directory Conventionsโ
- File names: Lowercase, hyphen-separated. Example:
install-termux.md, notInstallTermux.md. - Category files: Each directory must have a
_category_.jsonfile defining its sidebar label and position. - Page templates: Use the templates in the Page Templates section as a starting point for new pages.
Next Stepsโ
- Review the Style Guide for voice, tone, and formatting conventions
- Use the Guide Page Template or Reference Page Template when creating new pages
- Read How to Contribute for the pull request workflow