hugo-theme-codex icon indicating copy to clipboard operation
hugo-theme-codex copied to clipboard

Advanced Opengraph Support

Open ProfessorLogout opened this issue 5 years ago • 3 comments
trafficstars

As discussed in #82 For the moment just some quick notes on how we can do this:

  • Extract the twitter & other open graph like tags from baseof.html into a file like opengraph.html
  • Replicate current behavior in opengraph.html
  • Overwrite opengraph.html in https://github.com/msfjarvis/hugo-social-metadata bringing more advanced features
  • Telling users to submodule hugo-social-metadata and place it before codex in themes ( form my experience this works) to get enhanced behavior

This are just some quick notes early in the morning from mobile, excuse my formatting. Happy for comments, I will update once I can try this later today.

@msfjarvis @jakewies

ProfessorLogout avatar Jul 17 '20 05:07 ProfessorLogout

Looks good, happy to help with any changes to my module.

msfjarvis avatar Jul 17 '20 05:07 msfjarvis

Would this mean that hugo-social-metadata would need to be refactored to include an opengraph.html template in order to override the opengraph.html template in the theme?

Just peaked into @msfjarvis project and the template is named social_metadata.html.

I'm on board with this. The first two steps wouldn't include any new changes to this project other than prepping for optional functionality from hugo-social-metadata. We would need to update the README to document how it's done.

It would also mean changing our documentation on how to install this project I think? Since now we document adding it as a git submodule instead of a Hugo module.

EDIT: Sorry on mobile, now I see we can tell users to submodule both themes and just declare them as normal but put hugo-social-metadata first. Got it. I wouldn't mind considering Hugo modules as an additional improvement here. What do you all think about the submodule vs Hugo module declaration approach?

jakewies avatar Jul 17 '20 11:07 jakewies

Would this mean that hugo-social-metadata would need to be refactored to include an opengraph.html template in order to override the opengraph.html template in the theme?

Just peaked into @msfjarvis project and the template is named social_metadata.html.

I'm on board with this. The first two steps wouldn't include any new changes to this project other than prepping for optional functionality from hugo-social-metadata. We would need to update the README to document how it's done.

It would also mean changing our documentation on how to install this project I think? Since now we document adding it as a git submodule instead of a Hugo module.

EDIT: Sorry on mobile, now I see we can tell users to submodule both themes and just declare them as normal but put hugo-social-metadata first. Got it. I wouldn't mind considering Hugo modules as an additional improvement here. What do you all think about the submodule vs Hugo module declaration approach?

Looking forward to using and sharing this enhancement. Thank you.

iamericfletcher avatar Jul 29 '20 18:07 iamericfletcher