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

Use different var for meta author #68

Closed
mattcen opened this issue Jun 19, 2023 · 7 comments
Closed

Use different var for meta author #68

mattcen opened this issue Jun 19, 2023 · 7 comments
Labels

Comments

@mattcen
Copy link
Contributor

mattcen commented Jun 19, 2023

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?

@hugo-sid
Copy link
Owner

hugo-sid commented Jun 26, 2023

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.

@mattcen
Copy link
Contributor Author

mattcen commented Jun 26, 2023

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.

@mattcen
Copy link
Contributor Author

mattcen commented Jun 26, 2023

(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.)

@hugo-sid
Copy link
Owner

hugo-sid commented Jun 28, 2023

@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).

@hugo-sid
Copy link
Owner

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.

@github-actions
Copy link

github-actions bot commented Jul 8, 2023

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

@github-actions github-actions bot added the Stale label Jul 8, 2023
@github-actions
Copy link

This issue was auto-closed due to inactivity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants