EmielH / tale-hugo

A port of the Tale theme for Hugo. Tale is a minimal theme curated for storytellers.
https://themes.gohugo.io/tale-hugo/
MIT License
249 stars 123 forks source link

Why are Site.Params.Author and Site.Author.name separate? #36

Closed a-p-o closed 4 years ago

a-p-o commented 4 years ago

I am trying to understand the difference between these fields.

# Needed for copyright in footer
[Author]
    name = "Alex Ordonez"

# Needed for "written by" in post-info
[Params]
    Author = "Alex Ordonez"
EmielH commented 4 years ago

Hi @a-p-o, I don't entirely understand your question. Both lines you have highlighted refer to the same variable: {{ .Site.Params.Author }}.

Is your question that the instructions in the README seem to be wrong? The README says you need:

[Author]
    name = "..."

but the code seems to refer to:

[Params]
    Author = "..."

I have to admit that does look weird to me. 🙂 Could you clarify the question, please, so that I can investigate?

a-p-o commented 4 years ago

Hi @EmielH, I can understand your confusion—I should have double-checked my links! I meant to link to this commit https://github.com/EmielH/tale-hugo/commit/a4040547736578f6baf05b41b6a5ecd52ff2f77b instead of that footer partial.

Since the footer partial is using Site.Author.name to adhere to hugo standards, does it make sense to use Site.Author.name in partials/single/post-info.html as well?

EmielH commented 4 years ago

Thank you for clarifying! You are correct, I must have overlooked this when changing the footer. I will change it in the post info as well. Thanks a lot for filing this bug!

EmielH commented 4 years ago

Hi @a-p-o, apologies for the delay. I've just pushed this change. You shouldn't need .Site.Params.Author anymore. Could you check if it works for you? Thanks!

a-p-o commented 4 years ago

@EmielH, looks good! Thanks!