Minimalistic Hugo theme (mirror of https://github.com/niklasbuschmann/contrast-hugo)
Go to file
Niklas Buschmann 985135bfe4 improve sidebar
2020-02-04 03:04:06 +01:00
archetypes init 2019-07-15 15:04:11 +02:00
images fix case insensitivity 2019-07-18 22:05:52 +02:00
layouts improve sidebar 2020-02-04 03:04:06 +01:00
static improve sidebar 2020-02-04 03:04:06 +01:00
.gitignore init 2019-07-15 15:04:11 +02:00
LICENSE.txt move file 2019-07-18 21:59:43 +02:00
README.md improve sidebar 2020-02-04 03:04:06 +01:00
theme.toml change license 2019-07-18 22:09:55 +02:00

Adaption of the of contrast Jekyll theme.

Installation

To install Contrast as your default theme, first install this repository in the themes/ directory:

$ cd themes/
$ git clone https://github.com/niklasbuschmann/contrast-hugo.git

Second, specify contrast-hugo as your default theme in the config.toml file. Just add the line

theme = "contrast-hugo"

at the top of the file.

Options

In the params section of your config, you can enable a dark header style with darkheader = true and icon support with fontawesome = true - which can be used by adding pre entries to your site's menu. The site title in the header can also be hidden with hidetitle = true.

Sidebar

Instead of the horizontal menu, a sidebar can be enabled with sidebar = true. See here for an example of the sidebar in action.

An example configuration could look like this:

params:
  sidebar = true
  fontawesome = true
  description = 'Made by <a href="">John Doe</a>'

menu:
  main:
  - identifier = "home"
    name = "Home"
    url = "/"
    weight = 1
    pre = "<span class='fas fa-home'></span>"
  - identifier = "about"
    name = "About"
    url = "/about/"
    weight = 2
    pre = "<span class='fas fa-address-card'></span>"
  external:
  - identifier = "github"
    name = "Github"
    url = "https://github.com/"
    weight = 3
    pre = "<span class='fab fa-github'></span>"
  - identifier = "feed"
    name = "Subscribe"
    url = "/index.xml"
    weight = 4
    pre = "<span class='fas fa-rss'></span>"

Features

  • supports dark mode on macOS Mojave
  • optional sidebar
  • MathJax support
  • no external resources
  • responsive

Based on

License

public domain