Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
a-p-o opened this issue Jun 27, 2020 · 5 comments
Closed

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

a-p-o opened this issue Jun 27, 2020 · 5 comments

Comments

@a-p-o
Copy link

a-p-o commented Jun 27, 2020

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
Copy link
Owner

EmielH commented Jul 3, 2020

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
Copy link
Author

a-p-o commented Jul 6, 2020

Hi @EmielH, I can understand your confusion—I should have double-checked my links! I meant to link to this commit a404054 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
Copy link
Owner

EmielH commented Jul 6, 2020

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 added a commit that referenced this issue Aug 20, 2020
The footer already used .Site.Author.name instead of .Site.Params.Author
and now post info uses this variable as well. You can now safely delete
.Site.Params.Author from your configuration.

See #36
@EmielH
Copy link
Owner

EmielH commented Aug 20, 2020

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
Copy link
Author

a-p-o commented Aug 25, 2020

@EmielH, looks good! Thanks!

@EmielH EmielH closed this as completed Sep 8, 2020
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

No branches or pull requests

2 participants