This repository contains the source files for GL.iNet KVM documentation.
It is structured as a multilingual documentation repository. The current language sites are:
- English:
docs/en/ - German:
docs/de/ - Japanese:
docs/ja/ - Spanish:
docs/es/ - French:
docs/fr/ - Italian:
docs/it/ - Polish:
docs/pl/ - Dutch:
docs/nl/ - Swedish:
docs/sv/
Each language has its own mkdocs.yml, docs/, and overrides/ directory.
The documentation is built with MkDocs 1.5.3 and the Material for MkDocs theme 9.4.6.
Create a Python virtual environment:
python -m venv .venvActivate the virtual environment, then install dependencies:
pip install -r requirements.txtYou can also install Material for MkDocs directly:
pip install mkdocs-materialRefer: https://squidfunk.github.io/mkdocs-material/getting-started/#with-pip
The root docs/ folder contains one MkDocs project per language:
docs/
en/
de/
ja/
es/
fr/
it/
pl/
nl/
sv/
Each language directory contains mkdocs.yml, mkdocs.fast.yml, docs/, and overrides/.
In most cases, localized pages should mirror the corresponding English page path under docs/en/docs/.
English is the source for translations. Regulatory and compliance statements remain English-only and are omitted from localized navigation.
Run MkDocs against the language you want to preview.
mkdocs serve -f docs/en/mkdocs.ymlFor faster local editing, use:
mkdocs serve -f docs/en/mkdocs.fast.yml --dirtyTo preview the Spanish site, use mkdocs serve -f docs/es/mkdocs.fast.yml --dirty.
To preview the French site, use mkdocs serve -f docs/fr/mkdocs.fast.yml --dirty.
To preview the Italian site, use mkdocs serve -f docs/it/mkdocs.fast.yml --dirty.
To preview the Polish site, use mkdocs serve -f docs/pl/mkdocs.fast.yml --dirty.
To preview the Dutch site, use mkdocs serve -f docs/nl/mkdocs.fast.yml --dirty.
To preview the Swedish site, use mkdocs serve -f docs/sv/mkdocs.fast.yml --dirty.
Enable the repository's pre-commit hook once per clone:
git config core.hooksPath .githooksThe hook checks only the files staged for the commit:
- Heading IDs and anchor links (
scripts/anchors.py). - Localized pages: structure compared with the English page, untranslated English, and language rules such as Japanese full-width punctuation (
scripts/i18n_check.py). mkdocs.ymlchanges and added, renamed, or deleted pages: orphan pages and redirect problems.
Commits that change only English pages are not blocked. To bypass the hook in an emergency, use git commit --no-verify.
- English: https://docs.gl-inet.com/kvm/en/
- German: https://docs.gl-inet.com/kvm/de/
- Japanese: https://docs.gl-inet.com/kvm/ja/
- Spanish: https://docs.gl-inet.com/kvm/es/
- French: https://docs.gl-inet.com/kvm/fr/
- Italian: https://docs.gl-inet.com/kvm/it/
- Polish: https://docs.gl-inet.com/kvm/pl/
- Dutch: https://docs.gl-inet.com/kvm/nl/
- Swedish: https://docs.gl-inet.com/kvm/sv/
Each page use markdown, please check out this basic syntax of markdown here.
If you wanna a link to open in new tab, add {target="_blank"} at the end of link block.
Prefer to use png.
If the size of image is too big, please use the PhotoSwipe, check out here.
Use gl-50-desktop, gl-60-desktop, gl-70-desktop,gl-80-desktop, gl-90-desktop to set the percentage of the image width on desktop browser.
Example:
{class="gl-50-desktop"}
Use {class="glboxshadow"} to add shadow effect to the image.
Example:
{class="glboxshadow"}
<figure>
<img src="https://dummyimage.com/600x400/eee/aaa" width="300" />
<figcaption>Image caption</figcaption>
</figure>Every heading in every language carries an explicit ID, for example ## Local Access {#local-access}. Always include the #; {local-access} does not set an ID.
English defines the IDs. A localized heading uses the same ID as the matching English heading, so anchor links such as quick_setup_guide.md#local-access work in every language.
python scripts/anchors.py check # report missing IDs and broken anchor links
python scripts/anchors.py add --lang en # turn generated English IDs into explicit IDs
python scripts/anchors.py add --lang de [pages ...] # copy IDs from the matching English headingsAfter adding, renaming, or deleting pages, editing redirect_maps, or changing localized pages, run:
python scripts/i18n_check.py [--lang de ja ...] [pages ...]It compares each localized page with the English page section by section (images, admonitions, code blocks, tables, links, IP addresses, and version numbers) and reports orphan pages, missing pages, and broken redirects. It also flags untranslated English and language rules, such as Italian accents, French spaces before : ; ? !, and full-width () ? ! next to Japanese text.
English-only regulatory pages and German-only safety information are not compared. Fix the translation for everything else; add an entry to scripts/i18n_allowlist.yml only for intentional differences, with a reason.
[easytethering](../../../tutorials/tether)
Using the v4 version, v5 version looks better, but need to load js module. Don't know how to work it out in mkdocs.
Suggest to use PhotoSwipe when the width of image is large than 1021px.
<div class="gl-lightbox" itemscope itemtype="http://schema.org/ImageGallery">
<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
<a href="https://static.gl-inet.com/docs/router/en/3/setup/gl-b2200/hardware/hardware_1.jpg" itemprop="contentUrl" data-size="3167x2480">
<img src="https://static.gl-inet.com/docs/router/en/3/setup/gl-b2200/hardware/hardware_1.jpg" itemprop="thumbnail" alt="gl-b2200 pcb pinout" />
</a>
</figure>
</div>
Reference: