Hugo Theme for NoJS
  • HTML 58.4%
  • CSS 41.6%
Find a file
2026-07-11 13:58:12 -05:00
archetypes Initial commit 2025-09-16 23:11:33 +02:00
assets fix tabs wrapping 2026-07-11 12:48:51 -05:00
images Initial commit 2025-09-16 23:11:33 +02:00
layouts Add/update the xml feed as desired 2026-07-11 13:58:12 -05:00
hugo.toml Add config and update meta tags 2025-09-17 11:32:43 +02:00
LICENSE Initial commit 2025-09-16 23:11:33 +02:00
nojs.svg Add SVG logo 2025-09-27 18:13:45 +02:00
README.md Add/update the xml feed as desired 2026-07-11 13:58:12 -05:00
theme.toml Initial commit 2025-09-16 23:11:33 +02:00

noJS Hugo theme

A minimal, no-JavaScript theme for the Hugo static site generator. Check out the demo at nojs.andy.sb.

noJS theme screenshot

Features

Installation

For more information read the official quick start guide of Hugo.

In your themes/ directory, run:

git clone https://git.andy.sb/nojs.git

Set the theme in hugo.toml at the base of the Hugo site:

theme = "nojs"

Add menu entries:

[menus]
  [[menus.main]]
    name = 'Home'
    pageRef = '/'
    weight = 1

  [[menus.main]]
    name = 'Posts'
    pageRef = '/posts'
    weight = 2

  [[menus.main]]
    name = 'Tags'
    pageRef = '/tags'
    weight = 3

RSS feed

The theme ships a custom rss.xml that emits full post content in <content:encoded> (not just a teaser). Two site-level options control it:

ShowFullTextinRSS = true # top-level site config, not under [params]

[params]
  # limit feed items to posts published within this many months
  # (0 or unset = no age limit)
  rss_max_age_months = 6

Hugo's built-in [services.rss] limit config (item count) is still honored and combines with the age limit above — whichever is more restrictive wins.

By default the root/home feed (/index.xml) is built from every regular page on the site, across all sections. To instead source it from a single section (e.g. only content/blog), set:

[params]
  rss_section = "blog"

The root feed still lives at /index.xml; this only changes which pages populate it. Section feeds (e.g. /blog/index.xml) are unaffected and always reflect their own section.

A <link rel="alternate" type="application/rss+xml"> tag pointing at the root feed is emitted in <head> automatically for browser/reader autodiscovery.

Image captions

You can add captions to images (technically using <figcaption> HTML tags) by adding titles, like so:

![Alt text here](/path/to/image.png "Put your caption here!")

Syntax highlighting

Disable noClasses to use this modified algol_nu theme.

[markup]
  [markup.highlight]
    noClasses = false

LaTeX via transform.ToMath

Instead of client-side JavaScript rendering of mathematical markup using MathJax or KaTeX, use this passthrough render hook which calls the transform.ToMath function.

[markup]
  [markup.goldmark]
    [markup.goldmark.extensions]
      [markup.goldmark.extensions.passthrough]
        enable = true
        [markup.goldmark.extensions.passthrough.delimiters]
          block = [['\[', '\]'], ['$$', '$$']]
          inline = [['\(', '\)']]

Now add some mathematical markup to your content.

Calculate the cohomology \(H^n(C;G)\) using the _universal coefficient theorem_:

\[H^n(C;G) \cong \operatorname{Ext}(H_{n-1}(C),G) \oplus \operatorname{Hom}(H_n(C),G)\]

Note that the external katex.css is loaded in the head.html partial.

Extra Options

Opt-in prev/next entry navigation. A section enables this by setting enable_prev_next: true in its _index.md front matter.