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

Initial take on adding first class author, media and seo meta support #677

Closed
wants to merge 1 commit into from

Conversation

derekperkins
Copy link
Contributor

Added AuthorList, Author, AuthorSocial, Image and Video structs
Added Page.Author(s) functions
Added opengraph metadata template
#655 #675

@derekperkins derekperkins changed the title Initial take on adding first class author, media and opengraph support Initial take on adding first class author, media and seo meta support Nov 25, 2014
@derekperkins
Copy link
Contributor Author

Discussion on this topic / PR can be found here: http://discuss.gohugo.io/t/hugo-seo-social-partials/353

@@ -0,0 +1,49 @@
// Copyright © 2013 Steve Francia <spf@spf13.com>.
//
// Licensed under the Simple Public License, Version 2.0 (the "License");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this code be marked under SPL, or under Apache2, since this is an entirely new contribution?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep it all under the same license until we officially switch. It's cleaner that way.

…tructs

Added Page.Author(s) functions
Added schema, opengraph, twitter_cards, google_news metadata templates
Added "" template
@spf13
Copy link
Contributor

spf13 commented Dec 19, 2014

@derekperkins Thank you for this work. This looks like a good start and I'm merging it.

It's not quite 100% there for me yet though. A lot of times author is provided in the front matter as just a name. I'd like to be able to support either just the author as a string (just the name) or the more complete author here.

Additionally I think having an authors.(json, yaml, toml) file next to the config file that had the more structured data and simply referencing that in the content meta data would be ideal.

I've been working on Viper to enable additional support for files like this. It's nearly there.

Lastly, some of the field names feel a bit verbose. I think the are fine, but I'd like to support aliases.. So if the configuration provided just "bio" it would default to be stored in "longBio" for example. "firstName" -> "GivenName" etc.

Does this all make sense? Do you agree?

@spf13
Copy link
Contributor

spf13 commented Dec 19, 2014

Merged as 8f6f871

@spf13 spf13 closed this Dec 19, 2014
@derekperkins
Copy link
Contributor Author

@spf13 Thanks for merging this, I agree that it's still a WIP.

I think multiple config files is a great idea. If we have additional config files like authors.xxxx, then it would be easy in the site initialization to set a flag whether or not author information is available. Then based on that info, it would either just insert the string or return an object. I can switch this up once Viper is ready to handle the extra files.

I think adding aliases is a good idea. I grew up in China, where name order is switched, which is why I prefer GivenName and FamilyName (field names taken from Google), but obviously FirstName and LastName would be more common for most Hugo users at this point.

@github-actions
Copy link

github-actions bot commented Mar 5, 2022

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants