A simple, blog focused, theme for the sophisticated reader and blogger with ideas above their station.
Features:
- Archive
- Tags
- Org Mode friendly
- Featured Images in post summary
- A long, warm, rich aftertaste with hints of an autumn bonfire, like a good whisky
- Inside the folder of your Hugo site run:
$ git submodule add https://github.com/henryleach/grey-book.git themes/grey-book
- Add the theme's directory to your
config.toml
:
theme = "grey-book"
For more information read the official setup guide of Hugo.
Download the theme as a zip file from Github, then unzip it into a folder themes/grey-book
.
After installing the theme, you need to update the config.toml
file in your site's root directory.
Inside the exampleSite
folder of this theme is a config.toml
example config file. Copy it to the root directory of your site and change the options as you please.
⚠ You will probably need to delete the line:
themesDir = "../../"
which is needed to make the example theme site work.
Set them to whichever image you like using the parameters below. This path is relative to your assets directory, e.g. assets
unless you've modified that value. Avatar size is 150x150px.
[params]
favicon = "images/yourfavicon.jpg"
avatar = "images/youravatar.jpg"
roundAvatar = false
Any post can have a featured image set that will be used on the default list page along with the post's summary. Simply add featured_image = "filename.jpg"
to your post's front matter.
If you are using pageBundles and you don't specify an image, one from the pageBundle will be automatically added. If you specifically don't want to have a featured image, then set featured_image to a none existent filename, e.g.: featured_image = "none"
.
Grey Book has two pageBundle archetypes, depending if you want to create a Markdown or Org Mode based post. Either:
$ hugo new --kind md-post /posts/my-new-post-name
or for a Org Mode based post:
$ hugo new --kind org-post /posts/my-new-post-name
To enable comments, add following to your config file:
- Disqus shortname:
disqusShortname = "your-disqus-shortname"
- Enable Comments:
[params]
enableComments = true
(This should work as it's based on Hugo built ins, but is untested as I don't use comments.)
There are templates to add analytics scripts for Google and/or TinyAnalytics.
To avoid these being triggered in testing, they are only rendered if either you have an environment variable called 'HUGO_ENV' set to "production" or in the config file you have the 'env' variable set.
[params]
env = "production"
To enable Google analytics, add following to your config file:
- Google Analytics ID:
googleAnalytics = "your-google-analytics-id"
- Enable Google Analytics:
[params]
enableGoogleAnalytics = true
This is a reminant of the theme it was forked from, and I've never tested it, I assume it works, but best test it yourself.
Set the following in the config file, if omitted or set to false
it is not rendered. The site-id can be found when looking at the tracking code and is the jumble of letters after the last slash: https://app.tinyanalytics.io/pixel/<this-bit-here>
.
[params]
tinyAnalytics = "your tiny-analyics-tracking-code"
Forked from Nodejh's Mini theme.
The Summar/Details shortcode is from: hugomods.