Files
docs.a2v.space/AGENTS.md
T

3.0 KiB

AGENTS.md — docs.a2v.space

Hugo static site with custom theme. Russian-language personal documentation/knowledge base.

Commands

  • hugo server — dev server (live reload)
  • hugo — build to public/
  • No package manager, no build scripts, no tests, no linter.

Structure

  • hugo.toml — site config (TOML). Defines warm color palette params, menu, taxonomies (tags/categories/statuses), JSON output for search.
  • content/ — 7 sections: diary/, kb/, plans/, guides/, creds/, leadera/, personal-site/. Front matter is TOML (+++).
  • themes/a2v/ — custom theme (23 templates). All layout logic lives here.
  • static/ — CSS and JS at project root, not in the theme directory.
    • static/js/search.js — Fuse.js client-side search against Hugo-generated index.json
    • static/js/creds.js — Web Crypto API (AES-256-GCM + PBKDF2). Decryption on page; encryption via window.encryptCreds(data, password) in browser console.
    • static/css/custom.css — all custom styles (434 lines, CSS variables from hugo.toml params)
  • BRIEF.md — original spec with seed content and structure reference.

Key conventions

  • Archetype sets draft = true by default. Undraft with hugo --buildDrafts or remove draft = true from front matter.
  • relativeURLs = true in config — all URLs are relative, no baseURL needed for local dev.
  • Bootstrap 5.3.2 and Fuse.js 7.0.0 loaded from CDN (no local copies).
  • Each section can have its own list/single templates under themes/a2v/layouts/<section>/.
  • The sidebar partial (themes/a2v/layouts/partials/sidebar.html) is context-aware: shows tags, statuses, or services depending on the current section.
  • The source-path partial renders the local filesystem path of each content file for easy editing.
  • shortcodes/encrypted-creds.html is a passthrough wrapper for encrypted credential payloads.

Content front matter patterns

  • diary: date, title, tags
  • kb / guides: title, tags, draft
  • plans: title, date, plan_date, status (planned/in_progress/done/cancelled), done_date, context_quote
  • creds: title, description, service — body contains base64-encoded encrypted payload
  • leadera / personal-site: title, tags

Workflow

  • Always run hugo after making any changes (content, templates, config, CSS, JS) to verify the build succeeds without errors. This is mandatory before considering a task complete.

Gotchas

  • Static assets must go in static/ at project root, not themes/a2v/static/ (the theme static dir is empty).
  • The search index is generated by themes/a2v/layouts/_default/index.json — if you add a new section, it will be included automatically, but the Russian section label mapping is hardcoded in search.js.
  • hugo.toml has canonifyURLs = false — do not set to true or relative URLs break.
  • Hugo version installed: v0.159.1+extended (Homebrew). The theme requires ≥ 0.92.0.
  • No head.html partial exists — the <head> block is inline in baseof.html with a {{ block "head" }} extension point.