Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A LaTeX-inspired Hugo theme for elegant technical writing and academic content with server-side math rendering.

Fully customizable personal portfolio and blog website made with Spring Boot
HugoTeX is a free and open-source Hugo theme that replicates the typography and layout conventions of LaTeX documents for technical blogs, academic notes, and documentation sites. It runs on the Hugo static site generator and converts Markdown content—including LaTeX-style math—into fully static HTML with no client-side math rendering needed.
HugoTeX is a Hugo theme designed around the classic visual style of LaTeX, built by the HugoTeX team and distributed on GitHub under the MIT License. It takes standard Hugo content folders and front matter as input and produces a static website with academic-style page layout, abstract blocks, sidenotes, and automatic dark mode. The theme requires Hugo version 0.158.0 or later, and a live demo is hosted at hugotex.pages.dev.
transform.ToMath function during the build, so equations appear without loading any JavaScript client-side; inline math uses $...$ delimiters and block math uses $$...$$.prefers-color-scheme by default; setting darkmode = true or lightmode = true in the config forces either mode site-wide.[Params.SyntaxHighlighting].<!--more--> comment is rendered as a summary block at the top of the post.assets/css/custom.css, and switch between light and dark modes with a single flag.You install HugoTeX by adding it as a Git submodule, a Hugo module, or a direct clone into the themes directory of a Hugo site. The theme reads your hugo.toml configuration, including enabled taxonomies for categories, tags, and series. Mathematical content is processed by Hugo's Goldmark renderer with the passthrough extension enabled, then transformed server-side via transform.ToMath. The result is a static HTML site with no JavaScript dependencies for the core presentation.
HugoTeX is free to use and modify under the MIT License. There are no paid tiers, subscriptions, or license fees; you can use it for personal and commercial projects alike.
Yes, HugoTeX is published under the MIT License, meaning it is free to download, customize, and use in personal or commercial projects without payment.
HugoTeX needs Hugo 0.158.0 or newer. The configuration also enables Goldmark's passthrough extension, which must be present in your Hugo installation to support math delimiters.
Math is rendered server-side during the Hugo build using the transform.ToMath function, which converts KaTeX math to HTML at build time. No client-side JavaScript is required to display equations, so they load instantly.
Dark mode follows your users' system setting automatically. To force dark mode, add darkmode = true under [Params] in your hugo.toml. To force light mode, use lightmode = true instead.
sidenote shortcode?The sidenote shortcode adds margin notes to your content. On desktop, notes appear in the right margin; on mobile, they are folded behind a clickable reference number. The feature is powered by LaTeX.css.
