Eskerrik asko Zik proiektuan laguntzeagatik! / ¡Gracias por contribuir al proyecto Zik!
This guide explains how to contribute content, translations, templates, and code.
Zik is a static documentation website built with Astro + Starlight, hosted on
GitHub Pages. Content is authored in Markdown (with YAML frontmatter) and generated
into a bilingual site: Basque (root locale, /) and Spanish (under /es/).
- Stack: Astro 6, Starlight 0.40, Node.js 22
- Python tooling:
uv(Astral) for template generation (Markdown → DOCX/PDF) - Hosting: GitHub Pages via GitHub Actions
# Install dependencies
npm ci
# Start dev server (Basque root locale at http://localhost:4321/zik/)
npm run dev
# Build for production
npm run build
# Generate templates (Markdown → DOCX + PDF)
npm run templatesdocker compose up -d # Dev server on :4321
docker compose run templates # Generate templates.
├── astro.config.mjs # Astro + Starlight configuration
├── compose.yaml # Docker Compose dev environment
├── src/
│ ├── components/ # Custom Astro components (Footer, etc.)
│ ├── content/
│ │ ├── config.ts # Content collections config
│ │ ├── docs/ # Basque content (root locale)
│ │ │ ├── index.md # Homepage
│ │ │ ├── roadmap/ # "Where to start" phased guide
│ │ │ ├── legal/ # Legal compliance overview
│ │ │ ├── domains/ # 9 domain guidance pages
│ │ │ ├── templates/ # Templates download page
│ │ │ └── glossary/ # Cybersecurity glossary
│ │ ├── docs/es/ # Spanish translations (mirrors docs/)
│ │ └── i18n/eu.json # Basque UI translation strings
├── scripts/
│ ├── generate_templates.py # Markdown → DOCX + PDF
│ ├── templates-md/ # Template sources (Basque)
│ │ └── es/ # Template sources (Spanish)
│ └── pyproject.toml # uv Python project
├── public/
│ └── templates/ # Generated DOCX/PDF files (committed)
└── sources/ # Reference documents (NIST, ISO, laws)
- Basque pages:
src/content/docs/<path>/index.md - Spanish pages:
src/content/docs/es/<path>/index.md
Pages use standard Markdown with YAML frontmatter:
---
title: Page title (Basque or Spanish)
description: Short description for SEO
---Starlight-specific features you can use:
:::tip[...]/:::caution[...]/:::danger[...]— callout boxes:::— closes a callout- Tables, lists, code blocks — standard Markdown
npm run devVisit the page at its URL. HMR updates on save.
git add src/content/docs/
git commit -m "Describe your change"
git push- Copy the Basque page to the Spanish mirror:
src/content/docs/<path>/index.md→src/content/docs/es/<path>/index.md - Translate the content and update the frontmatter (
title,description). - Update internal links to point to
/es/...paths. - Preview with
npm run devand check/es/<path>/.
Fallback behavior: If a Spanish page does not exist, Starlight shows the Basque page with a "not yet translated" banner. You don't need to translate everything at once.
Templates are authored in Markdown and converted to DOCX + PDF at build time.
- Create or edit
scripts/templates-md/<name>.md. - Generate:
npm run templates - Output goes to
public/templates/<name>.pdfand.docx - Commit both the Markdown source and the generated files.
- Create
scripts/templates-md/es/<name>.md(same filename as Basque). - Generate:
npm run templates(processes both languages). - Output goes to
public/templates/es/<name>.pdfand.docx
- PDF:
markdown-it-pyfor Markdown → HTML,weasyprintfor HTML → PDF - DOCX:
pandocfor HTML → DOCX (fallback:python-docx)
The sidebar is configured in astro.config.mjs under starlight.sidebar. To add a
new section or page, edit the sidebar array. Each entry needs a label and a link
pointing to the page URL.
Starlight does not ship with Basque. We maintain custom UI translations in
src/content/i18n/eu.json. If you add a new Starlight feature that shows English
text, translate the corresponding key in this file.
Current keys: skip link, search, theme select, language select, menu, sidebar nav, table of contents, i18n notice, edit link, last updated, prev/next, and Pagefind.
The site deploys automatically via GitHub Actions on push to main. Workflow:
.github/workflows/deploy.yml.
The workflow:
- Checks out the repo
- Installs Node.js 22 + npm dependencies
- Installs pandoc (for template DOCX generation)
- Installs
uv+ Python dependencies - Runs
npm run templates(generates DOCX/PDF) - Runs
npm run build(builds Astro site) - Deploys
dist/to GitHub Pages
- Basque-first: Write Basque content first, Spanish translations follow.
- Plain language: Target school boards and Eraldi teams — avoid technical jargon.
- Action-oriented: Each domain page has a "What to do" section and a priority table.
- Legal disclaimer: Every legal page must include the disclaimer callout.
- Cross-references: Link to other pages (use
/path/for Basque,/es/path/for Spanish). - Attribution: Original Tknika guide:
tknika.github.io/zibersegurtasuna-ikastetxeetan
- Content: CC BY-SA 4.0
- Code: MIT