This is a Hugo theme, not a standalone site. All changes are template-level (Go templates, HTML, CSS/JS, YAML i18n). There is no package manager, build tool, or test suite beyond Hugo's own build.
To preview changes locally, build the example site with the parent directory as the themes root:
hugo --minify -s exampleSiteIf you want to see the site served, you can start a live server with:
hugo serve -s exampleSite --disableFastRender- Minimum Hugo version:
0.146.2(enforced at runtime inlayouts/_default/baseof.html). - CI matrix tests against
0.146.2,0.155.2, and0.163.0. - The deploy workflow pins
0.146.2. - CI uses the extended Hugo binary.
layouts/— Go HTML templates, partials, shortcodes, and default page layouts.static/— Vendored third-party assets (Bootstrap 5.3.5, jQuery 4.0.0, Font Awesome, KaTeX, PhotoSwipe, Highlight.js, Mermaid) plusmain.cssandcodeblock.css.exampleSite/— Demo content (content/,hugo.toml, and customlayouts/partials/head_custom.html/footer_custom.html).i18n/— Translation strings in YAML.data/beautifulhugo/social.toml— Social icon registry consumed bylayouts/partials/footer.html.
[Params.author]is required;[author]is deprecated.layouts/partials/footer.htmlemits an expliciterrorfif the old top-level[author]key is still present.- Asset loading is conditional on
selfHosted. WhenParams.selfHosted = true, the theme serves Bootstrap, Font Awesome, KaTeX, Google Fonts, and PhotoSwipe fromstatic/. Whenfalse(default), it loads them from CDNs. If you add or bump a vendored asset, update both thestatic/copy and the CDN conditional inlayouts/partials/head.htmlandlayouts/partials/footer.html. - Syntax highlighting is also conditional.
useHLJS = trueswitches to client-side Highlight.js (static/js/highlight.min.js+static/css/highlight.min.css). Otherwise it relies on Hugo's built-in Chroma andstatic/css/syntax.css. - Shortcodes provided:
details,columns/column/endcolumns,beautifulfigure(backwards-compatiblefigurealias),gallery,mermaid. disableFigureOverrideflag. SetParams.disableFigureOverride = trueto restore Hugo's native<figure>shortcode (the PhotoSwipe-enhanced version remains available asbeautifulfigure).- Multilingual is supported via the standard Hugo
languagesconfig with per-languagecontentDir. - No unit tests exist. The CI only confirms the example site builds cleanly across the Hugo version matrix. Run the build command above before opening a PR.
- Use
relURLinstead ofabsURLfor all asset and page URLs in templates.absURLproduces absolute URLs that break when the site is deployed under a subpath (e.g.example.com/blog/).relURLgenerates relative URLs that work correctly regardless of thebaseURLconfiguration. Similarly, preferrelLangURLoverabsLangURL. Note:absURLis still acceptable in structured-data JSON-LD and Open Graph / Twitter meta tags where absolute URLs are required by the spec. - Features must be documented in the example site. When adding or changing a feature, update the relevant page under
exampleSite/content/page/(especiallyconfiguration.mdandpages-and-layouts.md).