3.0 KiB
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 topublic/- 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-generatedindex.jsonstatic/js/creds.js— Web Crypto API (AES-256-GCM + PBKDF2). Decryption on page; encryption viawindow.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 = trueby default. Undraft withhugo --buildDraftsor removedraft = truefrom front matter. relativeURLs = truein 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-pathpartial renders the local filesystem path of each content file for easy editing. shortcodes/encrypted-creds.htmlis 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
hugoafter 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, notthemes/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 insearch.js. hugo.tomlhascanonifyURLs = 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.htmlpartial exists — the<head>block is inline inbaseof.htmlwith a{{ block "head" }}extension point.