A bilingual Brazilian Portuguese and English documentation website for POLIS, retaining the project's nautical visual identity. This site is maintained independently of the POLIS CLI and does not define or change its protocol contracts.
- Semantic HTML, CSS, and vanilla JavaScript; no client-side framework, application API, or server runtime.
- Python 3.10+, Jinja2, and markdown-it-py to generate static pages from Markdown.
- Separate local search indexes for each language, keyboard support, theme switching, clean URLs, and responsive layouts.
- Self-hosted variable Inter fonts (WOFF2, Latin and Latin Extended, upright and italic) under the
SIL Open Font License in
assets/fonts/LICENSE.txt. Local fallbacks remain available on Android, iOS, and desktop. - Static output in
dist/, suitable for GitHub Pages, Cloudflare Pages, Netlify, Vercel, or conventional HTTP servers.
cd polis-site python3 -m venv .venv source .venv/bin/activate python -m pip install -r requirements.txt python build.py python -m http.server 8000 --directory dist
On Windows PowerShell, activate .venv\Scripts\Activate.ps1 before running the python commands.
- PT-BR:
http://localhost:8000/ - English:
http://localhost:8000/en/ - PT-BR docs:
/docs/visao-geral/ - English docs:
/en/docs/overview/
The header always displays PT | EN on both languages, including mobile. The active language is highlighted and both links point to the equivalent translated document, not the language home page. Each language has its own search index (/search.json and /en/search.json). Portuguese URLs remain unchanged from the previous site version.
Each article has two Markdown files with the same filename:
content/visao-geral.md # Portuguese
content/en/visao-geral.md # English; slug: overview
Frontmatter example:
--- slug: overview title: Overview description: What POLIS is and why it exists. group: Comece aqui order: 1 source: README.md ---
title,description,groupandorderare required.sourcedefaults toREADME.mdandslugdefaults to the filename;slugcontrols the localized URL. Use the same group ID across both languages; translated group labels live ini18n.py.- When adding a page, create both language files with matching filenames. The build rejects missing counterparts or duplicate URL slugs, preventing broken language switches.
- Write internal links in the language of the target page, for example English
../installation/rather than../instalacao/. build.pygenerates navigation, adjacent-page links, headings, search indexes, page URLs and language counterparts.i18n.pyholds interface and navigation translations;templates/home.htmlandtemplates/home_en.htmlhold localized landing-page copy. Shared header and docs templates arebase.htmlanddoc.html.assets/styles.csscontains structural styling, whileassets/nautical.csscontains the image-inspired palette and decorations, including the always-visible PT/EN control.assets/app.jshandles theme, search, copy-to-clipboard, keyboard shortcuts, and responsive navigation.assets/og-cover-pt.pngandassets/og-cover-en.pngare localized 1200 × 630 social preview images based on the official POLIS cover; to regenerate them after changingassets/cover-art.webp, runpython tools/render_og.py(requires Pillow).
The command examples, schemas, and normative terminology of the POLIS CLI remain as documented in the V6 source. Changes to machine-level semantics must come from the POLIS Specification, not from this explanatory website.
Root domain:
python build.py --site-url https://docs.example.com
Subdirectory, e.g. GitHub Pages:
python build.py --base-path /polis-site/ --site-url https://username.github.io
The --site-url option enables canonical URLs, hreflang alternate-language metadata, a bilingual sitemap.xml, and absolute Open Graph/Twitter image URLs required by social crawlers. Always set the real production HTTPS origin when deploying (the example URL is not a configured domain). The source has no fixed production domain. Publish only the dist/ directory. No remote publication or hosting setup is performed by the build.
The two language paths are rooted at the selected --base-path: e.g., /polis-site/ and /polis-site/en/. On a static host, ensure directory index.html support is enabled.
Connect this repository to Vercel with Root Directory set to the repository root. The tracked vercel.json sets Framework Preset: Other, creates .venv with uv, installs requirements.txt into that environment, runs .venv/bin/python build.py, publishes Output Directory: dist, and preserves trailing slashes for routes such as /docs/visao-geral/ and /en/docs/overview/. Vercel serves the generated HTML, CSS, JavaScript, images and search indexes directly; no Python server or function entrypoint is needed.
Do not select the Python, Flask, or FastAPI framework presets. They expect a Python HTTP handler, whereas build.py is a generator only. The vercel.json overrides the framework and build settings stored in the Vercel dashboard; ensure the Vercel project points at this repository's root and builds the main branch. The previous global python3 -m pip install failed on Vercel with PEP 668 externally-managed-environment: its Python interpreter is managed by uv. Installing packages into .venv prevents that failure without overriding the managed interpreter. Both dist/ and .venv/ are intentionally untracked. To verify the same Vercel steps locally (requires uv), run from the repository root:
uv venv .venv && uv pip install --python .venv/bin/python -r requirements.txt
.venv/bin/python build.py
.venv/bin/python -m unittest discover -s tests -vOn repeat local runs, skip uv venv .venv if the environment already exists, or use
uv venv --allow-existing .venv to preserve it.
If a canonical production domain is configured, .venv/bin/python build.py --site-url https://your-domain.example adds the sitemap, canonical/hreflang tags and absolute social image URLs. The default Vercel build command leaves the canonical origin unset because this repository does not prescribe a production domain; set an appropriate build command in vercel.json when the domain is known.
python -m unittest discover -s tests -v
python build.py
node --check assets/app.js # optional: requires Node.jsTests check both document sets, page links, Markdown HTML safety, navigation, language counterparts, two search indexes, per-language metadata, source links, and subdirectory deployment. Review visual behavior in a browser before deployment.
GitHub Actions reproduces the isolated uv installation and Python build used by Vercel, runs the Python tests and checks JavaScript syntax on pushes and pull requests. The generated dist/ directory is excluded from Git; rebuild it from the tracked sources when publishing the site.
See CONTRIBUTING.md for English-language documentation and metadata conventions, how to maintain both localized versions of a page, and the required Conventional Commits and pull request format. GitHub Actions checks new commit subjects and pull request titles and descriptions. The optional local commit-message hook applies the same subject check before a commit is created.
- HTML semantic structure, skip links, keyboard focus,
/orCtrl/Cmd+Kfor search, Esc to close, remembered light/dark theme, and reduced-motion styles. - Search works when the static files are served over HTTP; opening the files using
file://may blockfetchof the local search index. - No remote search provider, analytics dependency, user accounts, database, or third-party hosted fonts are required.
- The original nautical cover is optimized as
assets/cover-art.webp, used as a subtle decorative hero/background element and as the source of the localized OG images. The colors draw on deep ocean blue, stone, brass, and lighthouse teal.
Sources: POLIS V6 README, docs/quickstart.md, docs/commands.md,
docs/workflows/local-agent-workspace.md, docs/workflows/web-agent-delivery.md,
docs/gates-and-progress.md, docs/policy-and-validation.md, docs/retention.md,
docs/installation.md, spec/POLIS-SPEC-v6.md, and
spec/POLIS-OFFLINE.md. The official V6 Specification
is authoritative whenever this website and the normative specification differ. The POLIS repository was
rechecked against POLIS v6.12.0 (origin/main at 12a2f71) on October 18, 2026.