appernetic / hugo-nederburg-theme

Nederburg is a fast and secure hugo theme and is a port of the Tracks WP theme
Other
107 stars 89 forks source link

Error If no author link is set #36

Open appernetic opened 6 years ago

appernetic commented 6 years ago

This is not working if there is no authorlink set in config.

Not working when remarked:

authorLink = "test@email"

but this works:

authorLink = "test@email"

In layout/_default/single.html:

Error while rendering "page" in "post/": template: _default/single.html:104:78: executing "main" at : wrong number of args for absURL: want 1 got 0

{{ $writer.link | default .Site.Params.authorlink | absURL}}

I thought that this would take care of missing config options (which is above the absurl link):

{{ if and (isset .Site.Params "authorlink") .Site.Params.authorLink }}

but it's not.

MatthewMcD commented 5 years ago

I have a fix for this, but it involves the same pages that I changed for PR #56 . I'll post the PR after I see that you are OK with PR #56. I'll merge it on my end and be certain there are no conflicts.