Updating Blog Config Using Hugo
Contents
In this post I’ll be making some changes to the blog configuration. Up till now it’s been running with the Even theme defaults, so let’s put a bit of personality into it!
First of all, let’s change the author name. Currently the author is listed as olOwOlo on the front page and at the bottom of each post:
In the config.toml
file, this value is set using the name
key under [author]
:
1 2 |
[author] name = "olOwOlo" |
Amending this to
1 2 |
[author] name = "Damien Jones" |
Produces the desired changes:
And while I’m here I’ll remove some of these icons. There’s an entire section in the config file for this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
[params.social] a-email = "mailto:your@email.com" b-stack-overflow = "http://localhost:1313" c-twitter = "http://localhost:1313" d-facebook = "http://localhost:1313" e-linkedin = "http://localhost:1313" f-google = "http://localhost:1313" g-github = "http://localhost:1313" h-weibo = "http://localhost:1313" i-zhihu = "http://localhost:1313" j-douban = "http://localhost:1313" k-pocket = "http://localhost:1313" l-tumblr = "http://localhost:1313" m-instagram = "http://localhost:1313" n-gitlab = "http://localhost:1313" o-bilibili = "http://localhost:1313" |
Some basic string editing here, along with commenting out most of these with hashtags. The blog also hasn’t been running since 2017 either, so let’s fix that by editing the since
key value from 2017 to 2019. This makes everything look much cleaner:
Next up, the blog tab’s title is still set to default:
This uses title
in config.toml
:
1
|
title = "Even - A super concise theme for Hugo" |
Changing to
1
|
title = "AmazonWebShark" |
Produces:
Another slight annoyance is that the Archives page only shows five posts per page - as the page count grows this is going to take ages to click though, so let’s change the archivePaginate
key from 5 to 10. I’ll also set ‘showArchiveCount’ to true as well, resulting in a change from this:
To
While here I found a moreMeta
key that adds word counts and read times to posts. Thought I’d give it a shot and set it to true. The titles revert from this:
To this:
Reckon I’ll keep that on for now! Finally the title of the blog needs updating. The code being changed here is
1 2 3 |
logoTitle = "Even" keywords = ["Hugo", "theme","even"] description = "Hugo theme even example site." |
Which is changed to
1 2 3 |
logoTitle = "AmazonWebShark" keywords = ["AWS", "AmazonWebShark","Hugo","Even"] description = "AmazonWebShark - an AWS blog built using Hugo" |
Which changes the blog from
To:
Getting there! Thanks for reading ~~^~~
Author Damien Jones
LastMod 2019-11-04