A Hugo port of Jekyll Now. The Hugo implementation is inspired by Hemingway.
Available for:
:white_check_mark: tags
:white_check_mark: titles
:white_check_mark: posts / .Content
Rather then using a JS library like hightlight.js I opt for server-side rendering with Pygments to keep in line with progressive enhamcements. Here is Hugo's opinion on the matter:
I would argue site usability / robustness far out weighs build times.The advantage of server side is that it doesn’t depend on a JavaScript library and consequently works very well when read from an RSS feed.
Enabled via toc
in your front matter:
toc: true
Add Hugo Now as a Module:
# pygments
PygmentsCodeFences = true
PygmentsStyle = "pygments"
[module]
[[module.imports]]
path = "github.com/mikeblum/hugo-now"
Update to the latest version:
hugo mod get -u github.com/mikeblum/hugo-now
Add Hugo Now as a submodule:
git submodule add [email protected]:mikeblum/hugo-now.git themes/hugo-now
Your .gitmodules
should now contain:
[submodule "themes/hugo-now"]
path = themes/hugo-now
url = [email protected]:mikeblum/hugo-now.git
Remember to commit your .gitmodules
config.toml
baseurl = "http://example.org/"
languageCode = "en-us"
title = "My New Hugo Site"
# use latest
[module]
[[module.imports]]
path = "github.com/mikeblum/hugo-now"
# or use local fork at themes/hugo-now
[module]
replacements = "github.com/mikeblum/hugo-now -> ../.."
[[module.imports]]
path = "github.com/mikeblum/hugo-now"
# analytics
# deprecated
GoogleAnalytics = "UA-XXXXXX"
UmamiAnalytics = "XXXX-XXXX-XXXX"
[taxonomies]
category = "categories"
tag = "tags"
[params]
description = "Hugo port of Jekyll Now"
author = "Hugo Now"
keywords = ["hugo-now", "hugo"]
avatar = "/images/hugo.png"
displayauthor = false
# pygments
PygmentsUseClasses = true
PygmentsCodeFences = true
# pagination
paginate = 10
paginatePath = "page"
Use SVG rather than PNG / JPG
Pygments styles use SASS
sass/style.scss
default
Pygments style - see Pygments Styleshugo server
You can go to localhost:1313 and this theme should be visible.
Build SASS updates by downloading Dart SASS
Development
sass sass/style.scss static/css/style.css
Production
sass sass/style.scss static/css/style.css --style compressed
Set the HUGO_ENV
variable to production
to use the minified CSS.
Hugo Now is licensed under the MIT License.
is based on Hemingway created by Asuka Suzuki.