Mini keeps the reading foundation separate from page layout and browser behavior.
Self-hosted Assets
CSS, JavaScript, Inter fonts, KaTeX and sharing assets are served from the site’s own domain. Hugo-only builds need no npm installation; optional Pagefind search needs Node.js 22.12+ and an indexing step after Hugo. Optional Mermaid diagrams use a pinned CDN fallback unless the site provides a local bundle. Configured analytics, Telegram widgets and sharing actions can contact their own services.
Conditional Loading
| Feature | When it loads |
|---|---|
| Shared theme CSS and JavaScript | Every page; minified and fingerprinted by Hugo |
| Pagefind | When search opens; the local index is generated after each Hugo build |
| KaTeX | Pages with math = true |
| Mermaid | Nearby diagrams first, then idle preparation of remaining diagrams and print copies on pages with mermaid = true |
| Likely | Posts with social sharing enabled |
| Telegram comments | Near the comments section, when channel and message ID are configured |
A local Mermaid ESM bundle can load only the diagram modules in use. Failed downloads leave diagram source readable. Exact transfer size depends on content, enabled features and browser caching.
Inter Font
The theme includes four WOFF2 faces with Latin and Cyrillic characters:
- 300 — body text
- 300 italic — italic text
- 500 — medium emphasis and prominent links
- 600 — headings and bold text
Weights 300 and 600 are preloaded. Other faces load when used. The font license is included with the files. The public demo uses a deployment-owned font profile; ordinary clones use Inter.
Render Hooks
Images (render-image.html) receive lazy loading and asynchronous decoding. Local raster images also receive intrinsic dimensions to reserve space. Raw HTML images need explicit dimensions; remote images are not downloaded during the build.
Links (render-link.html) open external URLs in a new tab with rel="noopener noreferrer". Internal page links resolve to the current language when a translation exists; localizeLinks = false disables that behavior.
Headings (render-heading.html) retain IDs and optional classes. The demo enables headingScroll so an article title or H2 links to itself. H3 retains the copy-link icon. Use .no-anchor to omit the link on an individual Markdown heading.
Tables (render-table.html) scroll within a keyboard-focusable region, keep validated ISO dates semantic and wrap cells for print.
CSS Architecture
assets/css/beauty.cssis the generated, pinned Beauty.css foundation for native typography and editorial helpers.assets/css/main.cssconfigures public tokens and owns fonts, page layout and theme components.
Hugo Pipes combines both into one minified, fingerprinted stylesheet. The shared browser bundle is cached across languages; localized labels come from HTML. No frontend framework or separate bundler is needed by a consuming site.
Use tokens in site-specific CSS rather than copying the shared typography:
:root {
--color-primary: #0060a0;
--color-primary-border: rgba(0, 96, 160, 0.35);
--color-accent: #b73700;
}custom_head.html and custom_body.html are extension hooks, not the theme’s stylesheet or script sources. Beauty updates go through the theme’s vendoring helper with a reviewed upstream commit and checksum.
Dark Mode
A small script resolves the saved or system preference before the stylesheet loads. The footer toggle saves an explicit choice in localStorage; until then, system changes remain active. CSS also follows the system palette without JavaScript.
Metadata and Performance
Shared templates generate canonical URLs, social metadata, structured data, language alternates and feeds. Page-specific configuration controls indexing and optional features.
Measure the built site with representative content and an empty browser cache. Image dimensions, conditional loading and cached assets reduce avoidable work, but the theme does not guarantee a fixed page size, offline availability or a Lighthouse score.