Quick Reference Cardยถ
Essential commands and references for Nexus documentation.
Build Commandsยถ
Build all languages:
python build_docs.py
Build specific language:
python build_docs.py --lang en # English
python build_docs.py --lang zh_CN # Chinese
Clean and rebuild:
python build_docs.py --clean
Build and serve:
python build_docs.py --serve
# Visit http://localhost:8000
Full build (with Doxygen):
python build_docs.py --doxygen
# or
make full
Translation Commandsยถ
Update translation files:
python build_docs.py --update-po
Auto-translate common terms:
python translate_helper.py zh_CN --auto-translate
Show translation statistics:
python translate_helper.py zh_CN --stats
Validate translations:
python translate_helper.py zh_CN --validate
Initialize new language:
python build_docs.py --init-po ja # Japanese
Makefile Shortcutsยถ
make help # Show all targets
make html-all # Build all languages
make html-zh_CN # Build Chinese only
make serve # Build and serve
make full # Clean + Doxygen + Build
make stats # Translation statistics
make validate # Validate translations
make linkcheck # Check for broken links
reStructuredText Syntaxยถ
Headings:
Main Title
==========
Section
-------
Subsection
~~~~~~~~~~
Text formatting:
**bold text**
*italic text*
``inline code``
Code blocks:
.. code-block:: c
int main(void) {
return 0;
}
Lists:
* Bullet item 1
* Bullet item 2
1. Numbered item 1
2. Numbered item 2
Links:
:doc:`path/to/document` # Internal document
:ref:`label-name` # Internal reference
`External Link <https://...>`_ # External link
Admonitions:
.. note::
Important information
.. warning::
Critical warning
.. tip::
Helpful suggestion
Tables:
+--------+--------+
| Header | Header |
+========+========+
| Cell | Cell |
+--------+--------+
Images:
.. image:: path/to/image.png
:alt: Alternative text
:width: 400px
Mermaid diagrams:
.. mermaid::
graph LR
A --> B
B --> C
Common File Locationsยถ
Documentation source:
docs/sphinx/
โโโ index.rst # Main entry point
โโโ getting_started/ # Getting started guides
โโโ user_guide/ # User documentation
โโโ tutorials/ # Tutorials
โโโ api/ # API reference
โโโ development/ # Development guides
Build output:
docs/sphinx/_build/html/
โโโ index.html # Language selector
โโโ en/ # English docs
โโโ zh_CN/ # Chinese docs
Translation files:
docs/sphinx/locale/
โโโ zh_CN/
โโโ LC_MESSAGES/
โโโ index.po
โโโ getting_started/
โโโ user_guide/
โโโ ...
Configuration:
docs/sphinx/
โโโ conf.py # Sphinx configuration
โโโ build_docs.py # Build script
โโโ translate_helper.py # Translation tool
โโโ Makefile # Make targets
Documentation Conventionsยถ
File naming:
Use lowercase with underscores:
my_module.rstBe descriptive:
gpio_control.rstnotgpio.rst
Cross-references:
Use
:doc:for documents::doc:`user_guide/hal`Use
:ref:for sections::ref:`gpio-config`
Code examples:
Always specify language:
.. code-block:: cInclude comments for clarity
Keep examples concise and focused
Admonitions:
.. note::- Additional information.. warning::- Important warnings.. tip::- Helpful suggestions.. important::- Critical information
Quick Troubleshootingยถ
Build fails:
# Check dependencies
pip install -r requirements.txt
# Clean and rebuild
python build_docs.py --clean
Translation not showing:
# Update .po files
python build_docs.py --update-po
# Rebuild specific language
python build_docs.py --lang zh_CN
Broken links:
# Check all links
make linkcheck
# View report
cat _build/linkcheck/output.txt
Doxygen errors:
# Run Doxygen manually
cd ../..
doxygen Doxyfile
# Check for errors in output
Useful Linksยถ
Documentation:
Documentation Guide - Complete navigation guide
Getting Started - Getting started
Contributing to Documentation - Contributing guide
External:
Project:
Common Tasks Checklistยถ
Adding new documentation:
โ Create .rst file in appropriate directory โ Add to toctree in index file โ Write content following conventions โ Build and verify locally โ Update translations if needed โ Submit pull request
Updating existing documentation:
โ Edit .rst file โ Update cross-references if needed โ Build and verify changes โ Update translations โ Check for broken links โ Submit pull request
Adding translation:
โ Run python build_docs.py --update-po
โ Edit .po files in locale/LANG/LC_MESSAGES/
โ Run python translate_helper.py LANG --validate
โ Build translated docs
โ Verify in browser
โ Submit pull request
Release documentation:
โ Update version in conf.py โ Update changelog โ Build all languages โ Run linkcheck โ Validate all translations โ Tag release โ Deploy to hosting
Keyboard Shortcuts (VS Code)ยถ
Editing:
Ctrl+Space- AutocompleteCtrl+/- Toggle commentCtrl+Shift+P- Command palette
Navigation:
Ctrl+P- Quick file openCtrl+Shift+F- Search in filesF12- Go to definition
Preview:
Install โreStructuredTextโ extension
Ctrl+Shift+R- Preview RST file
Tips and Best Practicesยถ
Writing:
Keep paragraphs short and focused
Use active voice
Include code examples
Add cross-references liberally
Translation:
Translate content, not code
Preserve RST markup
Use consistent terminology
Validate before committing
Building:
Build frequently during development
Use
--servefor live previewCheck warnings in build output
Validate links regularly
Maintenance:
Update translations when content changes
Keep dependencies up to date
Review and update examples
Monitor build performance
Need Help?ยถ
Search documentation: Use search box in sidebar
Check FAQ: Frequently Asked Questions
Ask community: GitHub Discussions
Report issues: GitHub Issues
โ
Last updated: 2026-01-25 Version: 2.0