2.6 KiB
2.6 KiB
AGENTS.md — Thanwer's Blog
Project
Hugo blog (multilingual EN + PT-BR) using the anubis2 theme as a git submodule (themes/anubis2, v1.6.0). Deployed via rsync to a VPS.
Commands
hugo server # dev server at localhost:1313
hugo # build to ./public/
./deploy.sh # hugo --minify && rsync to server
No tests, linter, or typecheck.
Content conventions
- Posts:
content/posts/<slug>.md(EN),content/posts/<slug>.pt.md(PT-BR) - Images:
static/images/<filename>— referenced as/images/<filename>in markdown - PT translations set
canonical = "/posts/<en-slug>"in frontmatter to point to the English original lastmodin frontmatter must use bare TOML datetime (no quotes):lastmod = 2026-05-09T00:00:00Z. WithenableGitInfo = true, the template prefers.Params.lastmodover git dates — avoid'<string>'quoted format (Hugo stores it as string, nottime.Time)- Archetype:
hugo new posts/<slug>.mdusesarchetypes/default.md - Tags only (no categories used):
tags = ["GNU/Linux", "Tools"]
Theme overrides (site layouts/ shadows theme)
layouts/partials/head.html— overrides theme head: adds canonical from frontmatter (Params.canonical), production-only Umami analyticslayouts/partials/post-info.html— overrides theme: prefers.Params.lastmodover.Lastmod(git override), shows "Last modified" whenlastmod ≠ datelayouts/partials/footer-extra.html— Ko-fi floating chat widgetlayouts/robots.txt— custom sitemap entries for both languages
Configuration quirks
- Theme expects all lowercase keys under
params.anubis2:colortheme,enablecolorthemeswitcher,readnextposts,socialicons, etc. — seethemes/anubis2/PARAMS.md [params.anubis2.services.umami]uses lowercase keys:id,url- Analytics only inject in production (
hugo.IsProduction). For testing analytics locally:hugo server --environment production - Config uses modern Hugo keys:
locale(notlanguageCode),label(notlanguageName) enableGitInfo = true—.Lastmodis derived from git; template falls back to frontmatterlastmodwhen set
Frontmatter reference
date = 2024-10-26T16:59:23-03:00
lastmod = 2026-05-09T00:00:00Z # bare datetime, no quotes
title = 'Post Title'
description = "One-line summary for SEO and RSS"
tags = ["tag1", "tag2"]
canonical = "/posts/original-post" # PT translations only
Deprecated Hugo keys (avoid)
languageCode→ uselocalelanguageName→ uselabel.Site.LanguageCode→ use.Site.Language.Locale