Skip to content

Support for Hugo 0.158#13

Open
svendahlstrand wants to merge 2 commits into
microdotblog:masterfrom
svendahlstrand:master
Open

Support for Hugo 0.158#13
svendahlstrand wants to merge 2 commits into
microdotblog:masterfrom
svendahlstrand:master

Conversation

@svendahlstrand

Copy link
Copy Markdown
Contributor

When running this theme on Hugo 0.158, {{ if eq .File.Dir "about/" }} blows up whenever .File is nil. In earlier versions of Hugo, this issue was silently ignored.

After looking into it, I realized the code was intended to determine whether to add a bio class to a wrapper section element. However, the logic never actually triggers, so the class was never used. To make the theme compatible with Hugo 0.158, I removed both the logic and the unused class along with its related styles.

I also replaced every instance of .Site.Author with .Site.Params.author. For more details about that, see microdotblog/theme-blank#12.

These changes have been tested both locally on my machine and in the production environment running Hugo versions 0.91 and 0.158.

This change also prevents a null exception from occurring in Hugo 0.158.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant