hugo-sid/hugo-blog-awesome

Use different var for meta author

mattcen opened this issue · 7 comments

I see here:

"name": "{{ .Site.Params.github }}"

That the JSON linked data uses Site.Params.github as the name of any given post's author. This means that, if this var is unset (which is likely, since the docs don't say to set it), there is no author name, and if it is set, it is set for all posts, even those which set a different author in their page metadata.

I think this should probably use per-page metadata if present, and fall back Site.Params.author.name. Does this seem reasonable?

That the JSON linked data uses Site.Params.github as the name of any given post's author. This means that, if this var is unset (which is likely, since the docs don't say to set it), there is no author name, and if it is set, it is set for all posts, even those which set a different author in their page metadata.

I think this should probably use per-page metadata if present, and fall back Site.Params.author.name. Does this seem reasonable?

You are correct @mattcen. Your suggestion is wise & reasonable. I will implement this when I get some time.

Depending how much it annoys me, I may also give this a shot soon. I think it'll require a custom frontmatter field because there isn't a "standard" author field but that shouldn't be a big deal.

(Oh, the other thing I haven't checked is whether the linked data name field is meant to be a full name, handle, or otherwise. Will need to do that, too.)

@mattcen, I think it makes sense to use full name for the name field.

Finally, we should have:

<a href="link">Full name</a>

If someone wishes to use any handle (let's say twitter), they can set the parameters (in frontmatter or in site config) such that we have:

<a href="https://twitter.com/handle">@handle</a>

This way, one can easily use handle(s).

I think it'll require a custom frontmatter field because there isn't a "standard" author field but that shouldn't be a big deal.

You are correct @mattcen.

This issue has been marked stale due to inactivity. It will auto-close in 7 days without an update.

This issue was auto-closed due to inactivity.