**Public events are posts.** A new Evento category brings three fields with it — event_date, event_time, event_location — and the first is required, because a post's own `date` is when it was announced and an event announced three weeks early would otherwise land in the agenda on the wrong day. Members propose events through the same queue as everything else, and the date survives approval untouched: the event the member described is the event that gets published. An event's page leads with the day, the time and the place before the title, shows its picture full width, and offers "añadir a mi calendario" — a real .ics beside the page, generated because the editor writes `outputs: ["HTML", "ics"]` into an event's frontmatter and nothing else asks for that format. It carries Event structured data as well as the BlogPosting it already had, which is what puts a date beside the result in a search listing. /page/agenda/ is a month grid per month, every month from the first event to the last built at build time, with a script that shows one and moves between them. That arrangement is the point: with JavaScript off every month is on the page as a list, with it on nothing is fetched to change months, and the month it opens on is the reader's rather than the one the site was built in. Hugo exposes no AddDate, so the length of a month is a table plus the leap rule and the first weekday falls out of formatting the date — it looks like something simpler was missed, and it is not. **The private calendar** is a sixth section: rows in SQLite, written by admins, read by every member, never published. It shows the public events too, marked, so a member has one place to look rather than two — they come from the content_cache the editor's listing already fills, which is why migration 5 adds three columns to it and to submissions. The grid is Python's own calendar.Calendar: no date arithmetic of mine anywhere in it. Two things the tests found on the way: gitea.py let `requests`' own exceptions through. They inherit from OSError, not from GiteaError, so the calendar's careful "keep working while the git server is down" would have been defeated by a refused connection — the page would have 500ed instead. Every transport failure is now a GiteaError, raised at the one place that touches the wire. This is the third bug of exactly that shape in this module. An admin's erasure clears events.created_by rather than reassigning it. The meeting still happens after they leave; the event belongs to the association. 509 tests pass, and the site builds with Hugo 0.135.0 under the pipeline's own --panicOnWarning. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
128 lines
4.4 KiB
YAML
128 lines
4.4 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 date carries the uniqueness. The day is
|
|
# part of it because the two posts that exposed this were eleven days apart in
|
|
# the same month; only same-title-same-day now collides, and the build guard in
|
|
# .woodpecker.yml fails that loudly instead of shipping it.
|
|
permalinks:
|
|
post: "/:year/:month/:day/: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."
|
|
# Only the two ends of the menu live here. Everything between them is built
|
|
# from the pages themselves by partials/header.html — so a page published
|
|
# from the members area appears on the site, with its own translated title,
|
|
# instead of needing three edits in this file. Weight decides the side:
|
|
# under 5 goes before the pages, 5 or more after them.
|
|
menus:
|
|
main:
|
|
- name: "Inicio"
|
|
url: "/"
|
|
weight: 1
|
|
# The way into the members area, in the menu for everybody: somebody who
|
|
# has an account needs to find the door, and somebody who does not should
|
|
# at least see that there is one.
|
|
- name: "Comunidad"
|
|
url: "/comunidad/"
|
|
weight: 9
|
|
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: "Community"
|
|
url: "/comunidad/"
|
|
weight: 9
|
|
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: "Comunidade"
|
|
url: "/comunidad/"
|
|
weight: 9
|
|
|
|
params:
|
|
# The picture a share card falls back on when a post or page has none, and the
|
|
# organisation's logo in the structured data. One path — /uploads/algo.png —
|
|
# and WhatsApp, Signal, Mastodon and Bluesky all start showing an image. Left
|
|
# empty until there is a logo to put here; a link then shares as title and
|
|
# description, which is what happens today.
|
|
defaultImage: ""
|
|
|
|
# The organisation's profiles elsewhere, for `sameAs` in the Organization
|
|
# schema: it is how a search or answer engine knows the Instagram account and
|
|
# this site are the same body. One URL per line when they exist.
|
|
sameAs: []
|
|
|
|
# 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
|
|
# One .ics beside an event's page, so "añadir a mi calendario" is a link and
|
|
# not an instruction. Only pages whose frontmatter lists this output generate
|
|
# one, and the editor writes that line for a post in the Evento category —
|
|
# see apps/board/content.py.
|
|
ics:
|
|
mediaType: "text/calendar"
|
|
baseName: "index"
|
|
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/
|