Compare commits

...
Author SHA1 Message Date
tgiachi
d7f076659a chore(release): 1.1.0 [skip ci]
## [1.1.0](https://git.kmalloc.org/squid/motorino/compare/v1.0.1...v1.1.0) (2026-11-15)

### Features

* add an optional projects page to the menu (1505e5d)
2026-11-15 17:44:50 +01:00
tgiachi
1505e5d782 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.
2026-11-15 17:44:40 +01:00
5 changed files with 13 additions and 5 deletions

View file

@ -1,3 +1,9 @@
## [1.1.0](https://git.kmalloc.org/squid/motorino/compare/v1.0.1...v1.1.0) (2026-11-15)
### Features
* add an optional projects page to the menu ([1505e5d](https://git.kmalloc.org/squid/motorino/commit/1505e5d))
## [1.0.1](https://git.kmalloc.org/squid/motorino/compare/v1.0.0...v1.0.1) (2026-11-15)
### Bug Fixes

View file

@ -28,7 +28,7 @@ func miniSite(t *testing.T) string {
"templates/pages/page.html": "<h1>{{page_title}}</h1>{{body}}\n",
"templates/post.html": "{{post_body}}\n", "templates/category.html": "{{category_posts}}\n",
}
for _, id := range []string{"home", "manifesto", "people", "services", "news", "history"} {
for _, id := range []string{"home", "manifesto", "people", "projects", "services", "news", "history"} {
name := id
switch id {
case "home":
@ -71,7 +71,7 @@ func TestRunBuildSuccess(t *testing.T) {
if code != 0 {
t.Fatalf("run(build) = %d, stderr %q", code, errOut.String())
}
if want := "built 6 pages into " + outDir; !strings.Contains(out.String(), want) {
if want := "built 7 pages into " + outDir; !strings.Contains(out.String(), want) {
t.Errorf("output %q does not contain %q", out.String(), want)
}
if _, err := os.Stat(filepath.Join(outDir, "index.html")); err != nil {

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"),