noJS is a minimal Hugo theme for the static site generator Hugo that builds pages without any client-side JavaScript, created by Andy Sukowski-Bang.
What is the noJS Hugo theme?
The noJS Hugo theme is a minimal, no-JavaScript theme for the Hugo static site generator, authored by Andy Sukowski-Bang and hosted on GitLab. It takes Markdown content and outputs static HTML/CSS pages, with a live demo at nojs.andy.sb. The repository includes archetypes, layouts, an assets/css folder, images, a nojs.svg logo, and a theme.toml manifest.
Key Features
- No JavaScript — The theme renders pages entirely without client-side JavaScript, using only HTML and CSS.
- Dark mode via prefers-color-scheme — The stylesheet automatically switches to a dark scheme when the user's system preference requests it.
- Syntax highlighting — The theme ships a modified algol_nu color scheme in assets/css/syntax.css; to activate it, set
noClasses = falsein the Hugo markup configuration. - LaTeX via transform.ToMath — A passthrough render hook in layouts/_markup/render-passthrough.html calls Hugo's transform.ToMath function, so mathematical markup is rendered at build time instead of with client-side MathJax or KaTeX. The theme loads katex.css in the head.html partial.
- Image captions — Add a title in the Markdown image syntax to render a
<figcaption>element under the image. - Main menu configuration — Menus are defined in hugo.toml with
[[menus.main]]entries specifying name, pageRef, and weight. - Recent Hugo compatibility — The commit history includes a fix for Language deprecation in Hugo v0.158.0, indicating active maintenance.
Who should use the noJS Hugo theme?
- Privacy-conscious bloggers — People who want a fast site with no tracking scripts or client-side dependencies can use this theme to publish a clean, script-free blog.
- Existing Hugo users — Anyone already using Hugo can drop the theme into their
themes/directory, settheme = "nojs", and get a minimal layout for posts, tags, and home pages. - Technical writers — Authors who need to display LaTeX math in their articles can write formulas directly in Markdown and have them rendered at build time without any JavaScript.
What can you do with the noJS Hugo theme?
- Launch a personal blog: Clone the theme, add menu entries, and use the built-in archetypes to create new posts quickly.
- Publish mathematical content: Use block delimiters
\[...\]or$$...$$and inline delimiters\(...\)to include LaTeX that is processed by transform.ToMath. - Customize the look: Override the CSS in assets/css, replace the nojs.svg logo, and add custom image captions to your media.
How does the noJS Hugo theme work?
- Clone the theme into your Hugo site's
themes/directory with the commandgit clone https://git.andy.sb/nojs.git. - Set
theme = "nojs"in your site'shugo.toml. - Add
[[menus.main]]entries for navigation. - Write Markdown content; Hugo builds the static site with no JavaScript output.
Pros and cons
- Pros: No JavaScript means faster page loads and better privacy; built-in LaTeX rendering; supports dark mode; actively maintained with recent commits.
- Cons: This theme only works with Hugo, not other static site generators; syntax highlighting requires manual configuration of
noClasses = false.
FAQ
Is the noJS Hugo theme free?
Yes, the theme is open-source and hosted on GitLab. You can clone it freely and use it in personal or commercial Hugo projects.
Does noJS really use no JavaScript?
Yes, the theme is designed to have zero client-side JavaScript. LaTeX and syntax highlighting are processed by Hugo at build time, and the only external resource is katex.css for styling math output.
How do I enable syntax highlighting?
In your hugo.toml, set noClasses = false under the [markup.highlight] section. This lets the theme's custom syntax.css apply its modified algol_nu color scheme to code blocks.
Can I use this theme with a static site generator other than Hugo?
No, the theme is built specifically for Hugo. It relies on Hugo-specific structures like theme.toml, layouts, and archetypes, so it cannot be installed in Jekyll, Eleventy, or other generators.




