Static blog site generator in one Go binary: Markdown in, self-contained semantic HTML out. No JavaScript, no database, minimal deps.

Config: dateFormat for human-readable dates (default YYYY-MM-DD) #29

Merged janantos.tngl.sh
targeting main from date-format
Merged opened by and assigned to janantos.tngl.sh
targeting main from date-format

New optional dateFormat field in config.json: tokens YYYY, MM, DD are replaced by year/month/day, everything else renders verbatim, so "DD.MM.YYYY" (European), "DD/MM/YYYY" or "YYYY/MM/DD" are one-liners.

  • Config.DateLayout() maps the tokens to a Go reference-time layout (YYYY->2006, MM->01, DD->02); empty/absent -> the ISO default
  • applies to the human-visible date text on post pages, the home post list and cards, the archive and tag pages
  • protocol dates stay ISO 8601 by design:
  • default keeps existing sites byte-identical (showcase rebuild = 0 changed files); tests: layout mapping, config default/override, end-to-end DD.MM.YYYY build across all five render sites + sitemap
Commits 0