feat(nav): add an optional projects page to the menu

kmalloc.org wants a "Projects" entry between People and Services,
linking to a page listing the software it currently builds. Adds
"projects" to the menu, the linked pages and the required pages, and
keeps the test fixtures (and the main_test page count) in sync.
This commit is contained in:
tgiachi 2026-11-15 17:44:40 +01:00
commit 1505e5d782
3 changed files with 7 additions and 5 deletions

View file

@ -28,7 +28,7 @@ type Options struct {
// requiredPages are the IDs every site must have in its default language,
// because the menu and the footer link to them.
var requiredPages = []string{"home", "manifesto", "people", "services", "news", "history"}
var requiredPages = []string{"home", "manifesto", "people", "projects", "services", "news", "history"}
// newsOnHome is how many news the home page lists; feedLimit is how many the feed has.
const (

View file

@ -10,10 +10,10 @@ import (
)
// menuPages are the IDs of the pages in the menu; the current one is marked.
var menuPages = []string{"home", "manifesto", "people", "services", "news"}
var menuPages = []string{"home", "manifesto", "people", "projects", "services", "news"}
// linkedPages are the IDs the templates link to with url_<id>.
var linkedPages = []string{"manifesto", "people", "services", "news", "history"}
var linkedPages = []string{"manifesto", "people", "projects", "services", "news", "history"}
// blockNames are the placeholders that expand to generated HTML. Until they
// are expanded they stand for themselves, so a page can hold them.

View file

@ -94,12 +94,14 @@ func baseFiles() map[string]string {
"content/en/manifesto.md": page("manifesto", "Manifesto", "Layout: manifesto\n", "## 01 — Antifascist\n\nText one.\n\n## Our commitments\n\nText two.\n"),
"content/en/manifesto-history.md": page("history", "Manifesto history", "", "Versions.\n"),
"content/en/people.md": page("people", "People", "", "## squid\n\nI run it.\n"),
"content/en/projects.md": page("projects", "Projects", "", "## motorino\n\nThis.\n"),
"content/en/services.md": page("services", "Services", "Switch: it=/it/servizi.html\n", "Write to **{{contact_shown}}**.\n"),
"content/en/news/index.md": page("news", "News", "", "{{news_list}}\n\n{{categories_list}}\n"),
"content/it/index.md": page("home", "kmalloc.org", "Layout: bare\n", "{{latest_news}}\n"),
"content/it/manifesto.md": page("manifesto", "Manifesto", "Layout: manifesto\n", "## 01 — Antifascisti\n\nTesto.\n"),
"content/it/cronologia-manifesto.md": page("history", "Cronologia", "", "Versioni.\n"),
"content/it/persone.md": page("people", "Persone", "", "Io.\n"),
"content/it/progetti.md": page("projects", "Progetti", "", "## motorino\n\nQuesto.\n"),
"content/it/servizi.md": page("services", "Servizi", "", "Scrivi a {{contact_shown}}.\n"),
"content/es/manifesto.md": page("manifesto", "Manifiesto", "Layout: manifesto\nNote: Traduccion de la version 1.0.\nManifestoVersion: 1.0\nManifestoDate: 2026-11-12\n", "## 01 — Antifascistas\n\nTexto.\n"),