Skip to content

Commit c390de9

Browse files
committed
Add a bilingual MkDocs Material documentation site
Build the docs/ pages into a Material for MkDocs site with English (default) and Spanish via the mkdocs-static-i18n plugin: a translated landing page plus Spanish counterparts (docs/*.es.md) of every page, an in-theme language switcher, search, a light/dark palette and translated navigation. Add docs/requirements.txt, the Docs GitHub Pages deploy workflow, and a contributor section on building and publishing the site. Ignore the local .venv-docs/ and the built site/ directory.
1 parent 850a2fd commit c390de9

16 files changed

Lines changed: 3889 additions & 0 deletions

.github/CONTRIBUTING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,31 @@ If you’d like to contribute code, follow these steps:
6464

6565
4. You’re ready to start contributing!
6666

67+
## Building the Documentation
68+
69+
The documentation site is built with [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) and is bilingual (English + Spanish) through the `mkdocs-static-i18n` plugin. English pages live in `docs/*.md`; their Spanish counterparts are the `docs/*.es.md` siblings.
70+
71+
```bash
72+
python3 -m venv .venv-docs
73+
.venv-docs/bin/pip install -r docs/requirements.txt
74+
.venv-docs/bin/mkdocs serve # live preview at http://127.0.0.1:8000/get_MNV/
75+
.venv-docs/bin/mkdocs build --strict # production build into ./site
76+
```
77+
78+
### Publishing
79+
80+
The site is published to GitHub Pages on the `gh-pages` branch and served at
81+
`https://pathogenomics-lab.github.io/get_MNV/`. The **Docs** workflow
82+
(`.github/workflows/docs.yml`) deploys automatically on pushes to the default
83+
branch that touch the docs, and can also be run manually. To publish from any
84+
branch locally:
85+
86+
```bash
87+
.venv-docs/bin/mkdocs gh-deploy --force
88+
```
89+
90+
Enable serving once under **Settings → Pages → Source: Deploy from a branch → `gh-pages` / `(root)`**. To surface the docs from another website, just link to that URL.
91+
6792
## Submitting a Pull Request
6893
1. Ensure that your code follows the coding guidelines and passes all tests.
6994
2. Write a clear commit message detailing what your change does.

.github/workflows/docs.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Docs
2+
3+
# Build the bilingual Material for MkDocs site and publish it to the gh-pages
4+
# branch, which GitHub Pages serves at https://pathogenomics-lab.github.io/get_MNV/.
5+
#
6+
# Triggers:
7+
# - push to the default branch touching docs/, mkdocs.yml or this workflow
8+
# - manual run (workflow_dispatch), selectable on any branch that has this file
9+
#
10+
# You can also publish from any branch locally, without CI:
11+
# .venv-docs/bin/mkdocs gh-deploy --force
12+
13+
on:
14+
push:
15+
branches: [main]
16+
paths:
17+
- "docs/**"
18+
- "mkdocs.yml"
19+
- ".github/workflows/docs.yml"
20+
workflow_dispatch:
21+
22+
permissions:
23+
contents: write
24+
25+
concurrency:
26+
group: docs-pages
27+
cancel-in-progress: false
28+
29+
jobs:
30+
deploy:
31+
name: Build and deploy docs
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 0
37+
- uses: actions/setup-python@v5
38+
with:
39+
python-version: "3.x"
40+
- name: Install build dependencies
41+
run: pip install -r docs/requirements.txt
42+
- name: Validate (strict build)
43+
run: mkdocs build --strict
44+
- name: Configure git identity
45+
run: |
46+
git config user.name "Paururo"
47+
git config user.email "50167687+Paururo@users.noreply.github.com"
48+
- name: Deploy to gh-pages
49+
run: mkdocs gh-deploy --force

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ src-tauri/gen/
1414
minimal_example.tar.gz
1515
minimal_example/
1616
/test_pancreas/
17+
18+
# Documentation site (MkDocs)
19+
/.venv-docs/
20+
/site/

docs/assets/get_mnv.png

199 KB
Loading

0 commit comments

Comments
 (0)