A simple, blog focused, theme for the sophisticated reader and blogger with ideas above their station.
Features:
- Archive
- Tags
- Emacs Org Mode friendly
- Featured Images in post summary
- Light & Dark modes
- A long, warm, rich aftertaste with hints of an autumn bonfire, like a good whisky
The Light/Dark themes are automatic and will be selected on the basis of the user's system and browser settings, there is no manual selection option. All images will be converted to WebP (except for org-mode posts, see changelog).
- 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
hugo.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
There are templates to add analytics scripts for 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"
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"
This template includes meta details for richer integration into Fediverse applications like Mastodon and generate preview cards.
To check your site's metadata you can use Robb Knight's Lens tool.
You can verify your Mastodon profile by adding one or more (you may have multiple profiles) me links in a list:
meLinks = ["https://example.com/@user"]
Compatible with Mastodon v4.3+. Make sure to add your domain under Settings >
Profile > Verification - Author attribution. Then add the line below to your site's hugo.toml
file.
fediverseCreator = "@[email protected]"
If your page has a featured image, this will be used to create a OpenGraph image that is used to generate. If there is no image, or it's the homepage, it will fall back to what is defined under openGraphImage
. It's best to include this, otherwise some services will keep trying to generate one
openGraphImage = "images/og_image.png"
Forked from Nodejh's Mini theme.
The Summary/Details shortcode is from: hugomods.