vienalatina/config.yaml
Claude 67706ee36e
Stop two posts with the same title from sharing one URL
Publishing a second "Hola mundo" through the CMS broke the first one's page:
it rendered the article, then a second copy of the entire site. Three silent
failures lined up.

Decap could not write hola-mundo.es.md twice, so it wrote hola-mundo.es-1.md.
That suffix is not a language, so Hugo stopped treating the file as a Spanish
sibling and translate.py's split_lang() skipped it — the post went live in
Spanish alone, and no German or Portuguese was ever generated. Meanwhile
permalinks used "/:slug/", and :slug falls back to the title, so both files
claimed /hola-mundo/; Hugo wrote both documents into that one index.html.
Nothing failed. The pipeline was green throughout.

Each layer now refuses its part: post permalinks carry the year and month, the
CMS prefixes new filenames with the date, and translate.py aborts on a name
ending in a clash counter rather than quietly declining to translate it. The
build also runs with --printPathWarnings --panicOnWarning, so any future pair
of pages targeting one path fails the build instead of corrupting the output.

Existing post URLs change shape (/hola-mundo/ becomes /2026/09/hola-mundo/).
That costs nothing today, with one real post and no inbound links, and gets
expensive to change later.

Verified: 16/16 pipeline checks and 15/15 markdown checks still pass, the
clash-counter name aborts with the rename instruction, and an ordinary
filename still parses.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
2026-09-22 07:49:46 +00:00

106 lines
2.9 KiB
YAML

# Viena Latina — Hugo site configuration
# Three languages: Spanish (default, at /), German (/de/), Brazilian Portuguese (/pt-br/).
# Siblings pair by filename basename: mi-articulo.es.md ↔ mi-articulo.de.md ↔ mi-articulo.pt-br.md
baseURL: "https://vienalatina.com/"
title: "Viena Latina"
theme: "vienalatina"
defaultContentLanguage: "es"
defaultContentLanguageInSubdir: false
# Date-scoped so two posts can share a title without fighting over one URL.
# `:slug` falls back to the title when front matter sets none, so a bare
# "/:slug/" mapped every post called "Hola mundo" onto /hola-mundo/; Hugo wrote
# both documents into that one index.html and the page rendered as two stacked
# copies of the site, with no error anywhere. Community blogs repeat titles
# constantly ("Resumen del mes"), so the year and month carry the uniqueness.
permalinks:
post: "/:year/:month/:slug/"
taxonomies:
category: "categories"
tag: "tags"
languages:
es:
languageCode: "es"
languageName: "Español"
weight: 1
params:
description: "Comunidad latinoamericana en Viena — turismo, cultura, gastronomía, comunidad y comercio."
menus:
main:
- name: "Inicio"
url: "/"
weight: 1
- name: "Acerca"
url: "/page/acerca/"
weight: 2
- name: "Contacto"
url: "/page/contacto/"
weight: 3
de:
languageCode: "de"
languageName: "Deutsch"
weight: 2
params:
description: "Lateinamerikanische Community in Wien — Tourismus, Kultur, Gastronomie, Gemeinschaft und Handel."
menus:
main:
- name: "Start"
url: "/de/"
weight: 1
- name: "Über uns"
url: "/de/page/acerca/"
weight: 2
- name: "Kontakt"
url: "/de/page/contacto/"
weight: 3
pt-br:
languageCode: "pt-BR"
languageName: "Português (Brasil)"
weight: 3
params:
description: "Comunidade latino-americana em Viena — turismo, cultura, gastronomia, comunidade e comércio."
menus:
main:
- name: "Início"
url: "/pt-br/"
weight: 1
- name: "Sobre"
url: "/pt-br/page/acerca/"
weight: 2
- name: "Contato"
url: "/pt-br/page/contacto/"
weight: 3
params:
# og:locale values per language slug (ported from theme/inc/seo.php).
localeMap:
es: "es_ES"
de: "de_DE"
pt-br: "pt_BR"
# llms.txt — custom plain-text output rendered from layouts/index.llms.txt
# (ported from theme/inc/robots-and-llms.php).
outputFormats:
llms:
mediaType: "text/plain"
baseName: "llms"
isPlainText: true
outputs:
home: ["HTML", "RSS", "llms"]
sitemap:
changefreq: "weekly"
priority: 0.5
markup:
goldmark:
renderer:
unsafe: true # WP-migrated content contains inline HTML
enableRobotsTXT: false # robots.txt is a static file in static/