itziarZG 950af21f7b feat(build): introduce scripts/build.sh for deploy-time envsubst
Replaces literal email and Umami website ID in the HTML files with
[EMAIL_ADDRESS] and [UMAMI_WEBSITE_ID] placeholders. Coolify runs
scripts/build.sh as the build step before serving, substituting the
placeholders with values from service env vars (CONTACT_EMAIL and
UMAMI_WEBSITE_ID). The repo no longer contains the real email or
website id.

Also mirrors recent text refinements from the Catalan 'Per què ho
faig' section into the Spanish 'Por qué lo hago' section. Adds public/
to .gitignore and refreshes README + CHANGELOG.
2026-07-30 15:28:28 +02:00

Posidonia

Qué es Posidonia

Sitio editorial estático en catalán y español sobre el seguimiento de la Posidonia oceanica ocho años después del Decreto 25/2018. Sintetiza datos de GEN-GOB y Amics de la Terra Eivissa con HTML semántico, CSS y gráficos SVG, sin JavaScript de cliente ni servicios de terceros.

Estructura

/
├── index.html           # Català (primari, x-default) — contiene placeholders
├── es/
│   └── index.html       # Castellano — contiene placeholders
├── og-image-ca.jpg      # 1200×630, imatge social per a /
├── og-image-es.jpg      # 1200×630, imatge social per a /es/
├── robots.txt
├── sitemap.xml          # enumera / i /es/ amb hreflang complet
└── scripts/
    └── build.sh         # sed envsubst → ./public/
  • / és l'idioma principal (hreflang="x-default").
  • /es/ és l'alternativa en castellà.
  • Cada pàgina porta un selector d'idioma a la cantonada superior dreta del <header> (CA | ES), amb aria-current="page" a l'idioma actiu.
  • Tots dos documents declaren <link rel="alternate" hreflang="…"> per a l'altra llengua i per a x-default, més el seu propi canonical.

Build & Deploy

This site uses a small build step that substitutes two placeholders — [EMAIL_ADDRESS] and [UMAMI_WEBSITE_ID] — with values supplied via Coolify environment variables. The build output goes to ./public/, which Coolify serves as the static site root. The real email and Umami UUID never appear in the repo.

Coolify service config:

  • Build command: bash scripts/build.sh
  • Publish directory: public
  • Environment variables (set in Coolify service "Environment" tab):
    • CONTACT_EMAIL — your real contact email (e.g. hello@example.com)
    • UMAMI_WEBSITE_ID — your Umami website UUID (e.g. 8ba9afa3-f6d3-45d9-b2ad-…)

Local build for testing:

CONTACT_EMAIL=hello@example.com UMAMI_WEBSITE_ID=8ba9afa3-… bash scripts/build.sh
python3 -m http.server --directory public 8000  # preview

The build is just a sed substitution; no Node toolchain required. The output ./public/ is gitignored.

Deploy

Crea un CNAME para posidonia.eivissaenvironmentalwatch.es apuntando al ingreso del servidor Hetzner/Coolify.

Coolify aprovisiona HTTPS con Let's Encrypt después de que el DNS se propague. Si se alcanza un límite de emisión, conserva el DNS correcto, revisa los registros de validación y reintenta después de una hora; no solicites certificados repetidamente durante la propagación.

Nota de carbono

La página usa tipografías del sistema, CSS y SVG en línea, cero scripts externos y presupuestos automáticos de bytes. El objetivo de la carga ordinaria es un único documento HTML de menos de 10 KB gzip y menos de 30 KB gzip en total. La imagen social solo se solicita al generar una vista previa.

Contacto

Escribe a Itziar ZG.

S
Description
No description provided
Readme
376 KiB
Languages
HTML 100%