Hugo theme designed for reading and printing text with dark and light modes.

Features

Distinguishing features

  • Designed for reading and printing text.
  • Print: any page in light theme mode for readability.
  • CV: or resume template to reduce vertical space by using 2 columns and shortcodes to list the experiences and skills.
  • Slides: support using reveal.js.
  • Lists: separate view and pagination for simple list items and post entries.
  • GitInfo: show the latest git commit short hash and subject message for each page (requires Hugo GitInfo config enabled).
  • Fonts:
    • “Roboto Slab (serif)” for title (heading) text.
    • “Fira Sans (sans-serif)” for normal text.
    • “Ubuntu Mono (monospace)” for code.
  • Colors: in the theme are derived using a single primary color (blue) from the HSL colors.
  • Website banner is supported.

Adopted features

  • Minimal configuration.
  • Switchable dark and light themes with automatic selection based on system theme.
  • SEO friendly OpenGraph and twitter cards support
  • Customizable using configurations for: “full width”, “centered”.
  • Taxonomies and posts RSS.
  • Responsive tested on desktop and on smart phones.
  • Responsive menus for desktop and mobile screens.
  • Accessibility tested using WAVE Web Accessibility Evaluation Tool.
  • Code blocks are highlighted using Hugo built-in blazing fast Chroma.
  • Copy code, see code language and file name (optional).
  • Tightly coupled with Hugo extended latest version (v1.110.0) to compile and generate asset bundles with pipelines, fingerprinting and minification.

Other features

These are supported due to panr/terminal theme base code but not tested as I don’t use them myself:

  • Post cover image.
  • Images in post with caption.
  • Comments.

Installation

Follow the steps in any one of these methods to install or update a Hugo theme.

Method - Using hugo mod

Add hugo-xterm theme as Hugo module to hide the theme content and let you focus only on your site content. Let Hugo handle the theme updates automatically and control the theme as a Hugo module instead of git.

Lang: bash
 1cd <your-site-directory>
 2
 3# initialize your site as a hugo module.
 4hugo mod init <your-repo-host/your-username/your-site-repo>
 5
 6# import hugo-xterm theme as hugo module in configuration
 7$ cat config/_default/config.toml
 8[module]
 9  [[module.imports]]
10    path = "github.com/manid2/hugo-xterm"
11
12# update theme
13hugo mod get -u

For all below methods your site needs to point to hugo-xterm theme subdirectory in configuration as below:

Lang: bash
1$ cat config/_default/config.toml
2theme = "hugo-xterm"

Method - Download and copy theme

Download the archived (i.e. .zip or tar.gz) theme from github repository releases page. Extract and copy the contents into themes/hugo-xterm subdirectory in your site directory.

To update the theme just download a new release and overwrite the same subdirectory.

This method is simple, can be automated with script and saves space on disk by omitting the theme repository history.

Method - Using git clone

This method clones the theme repository with history into your site’s themes subdirectory which is useful if you want to control the history or make your own private modifications to the theme.

Lang: bash
1cd <your-site-directory>
2git clone https://github.com/manid2/hugo-xterm themes/hugo-xterm --depth=1
3
4# update theme
5cd themes/hugo-xterm
6git pull

Method - Using git submodule

This is similar to cloning the theme into subdirectory except using git submodule which makes the theme acts a dependency of your site repository. It lets git to control your site and its dependency this theme.

Lang: bash
1git submodule add --depth=1 https://github.com/manid2/hugo-xterm \
2themes/hugo-xterm
3
4# update theme
5git submodule update --remote --merge

Local development

Lang: bash
1# add to go.mod for local development
2# replace github.com/manid2/hugo-xterm => ../hugo-xterm
3hugo server --source exampleSite

Credits

This theme was initially based on panr/terminal theme but is re-written from scratch to optimize for reading and print text heavy web pages.

Parts of the features in this theme are either taken directly or based on the features from popular themes and websites as listed below:

License

GNU General Public License v3.0