vienalatina/config.yaml
Claude 790bd2230f
Share buttons, and a card that arrives with its picture
Seven buttons under the title of every post and again after the text —
the reader who decides on sight and the one who decides at the end are
different people.

Four are ordinary links and work with scripting off: WhatsApp, Facebook,
Bluesky and Mastodon all take a URL that opens their own composer. The
other three cannot be, and the reason is worth writing down rather than
rediscovering: Signal has no web intent at all — it is a share target in
the operating system's sheet and nowhere else — and Instagram accepts no
link from anybody, by design, which is why every site with an Instagram
share button is really offering a copied link. Both call
navigator.share() where it exists and copy the address where it does
not, beside a plain «Copiar enlace» that always works.

Mastodon has no central address: the composer lives on whichever server
the reader has an account on. It asks once, keeps the answer, and
without scripting falls back to the association's own server.

The icons are simplified marks in one visual language rather than the
official logo files — reproducing those from memory gives something
subtly wrong, and subtly wrong looks worse than plainly simple. Each
carries its name for a screen reader and in `title` for a cursor.

**And the half that was actually broken.** og:image pointed at the
original upload: a photograph off a phone, two to five megabytes.
WhatsApp fetches preview images on a tight budget and gives up on a file
that size, so the card arrived as a title and a link with a blank where
the picture should be. Hugo copies static/ and processes assets/, and
only the second can be resized — so config.yaml mounts static/uploads
and static/brand into assets/ as well, leaving every existing URL and
everything the editor commits untouched, and seo-head.html now builds
the card: 1200x630, filled from the middle, 93 KB measured against a
22 MB source. The logo fallback is fitted rather than filled and keeps
its own format, because a wordmark cropped to a landscape card loses its
ends and a transparent PNG turned into JPEG lands on a black square.

og:image:width and :height go out with it, from the generated file so
they cannot disagree with it. Several clients draw the small card rather
than the large one when they would have to fetch the image to find out
how big it is.

Three guards, each verified by reintroducing its own bug: a button that
needs the script says so in the markup; a hidden button is actually
hidden (`[hidden]` is a user-agent rule and `display: inline-flex` beat
it, so all seven showed and three did nothing); and every encoded link
is marked safeURL, without which Go's escaper encoded it a second time
and WhatsApp opened with %253A spelled out.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
2026-10-09 08:47:42 +00:00

170 lines
6.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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/"
# No taxonomies. An empty map rather than no `taxonomies` key at all: leaving
# the key out restores Hugo's own defaults, which are `tags` and `categories` —
# so deleting the block built the very pages it was meant to remove. This turns
# them off, and /categories/… and /tags/ fall through to the site's 404.
taxonomies: {}
languages:
es:
languageCode: "es"
languageName: "Español"
weight: 1
params:
description: "Comunidad latinoamericana en Viena — turismo, cultura, gastronomía, comunidad y comercio."
# Only Inicio lives here. Everything after it 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.
#
# Comunidad used to be the entry at weight 9. It is a button in the header
# bar now rather than a word in the menu, so its three translations live in
# partials/t.html — the URL is the same in every language, and a menu entry
# was only ever carrying the label.
menus:
main:
- name: "Inicio"
url: "/"
weight: 1
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
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
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.
#
# **The logo uploaded in Gestión → Marca is used first**, so this is now only
# for a site that wants a different share picture from its logo — a photo of
# the city, say. One path (/uploads/algo.png) and WhatsApp, Signal, Mastodon
# and Bluesky all start showing an image. Empty, with no logo either, means a
# link shares as title and description.
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:
# Raw HTML in a post is not rendered as HTML. It was on, for content
# migrated from WordPress that carried inline markup; that content is
# gone — no file under content/ holds a single tag — and leaving it on
# had a cost that grew with the members area: a proposal written by a
# member is rendered here with `html=False`, so a moderator reviewing
# `<img src=x onerror=…>` sees the characters and approves them, and
# this flag is what would have run them on the live site.
#
# hardWraps is deliberately left off: the files are hard-wrapped at
# about 78 characters, so turning it on would break every sentence in
# half. apps/board/render.py says how the two renderers are kept
# honest about that.
unsafe: false
enableRobotsTXT: false # robots.txt is a static file in static/
# The uploads are mounted twice on purpose.
#
# Hugo copies `static/` and processes `assets/`, and a picture that is only
# copied cannot be resized — which is why a share card used to point at the
# original: a photograph off a phone, two to five megabytes. WhatsApp fetches a
# preview image on a tight budget and gives up on a file that size, so the card
# arrived with a blank where the picture should be.
#
# Mounting `static/uploads` into `assets/uploads` as well lets seo-head.html
# build a 1200×630 card from the same file, while the static copy stays exactly
# where it is: every existing /uploads/… URL, every image in every post, and
# everything the editor commits are untouched.
#
# Declaring any mount means declaring them all — these five are Hugo's own
# defaults, written out so nothing silently stops being read.
module:
mounts:
- source: content
target: content
- source: layouts
target: layouts
- source: data
target: data
- source: assets
target: assets
- source: static
target: static
- source: static/uploads
target: assets/uploads
- source: static/brand
target: assets/brand