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

Make Twitter card's content value configurable #1477

Open
pfertyk opened this issue Apr 1, 2024 · 2 comments
Open

Make Twitter card's content value configurable #1477

pfertyk opened this issue Apr 1, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@pfertyk
Copy link

pfertyk commented Apr 1, 2024

Hi!

First of all: I would like to thank you for a wonderful Hugo theme! It has everything I need for my website :)

I have switched to Hugo after using Pelican, and I wanted to keep some things consistent with the previous version (e.g. URLs of articles, RSS file path, etc). This theme allowed me to configure practically everything except for Twitter cards. The configuration I had in Pelican used content="summary" while PaperMod uses content="summary_large_image".

I realize that it's not an urgent issue, but with only a square photo (of my face) available for my blog posts, the large image version looked really weird ... I ended up forking this repo and changing a single line of code: pfertyk@a6c4a3c

This works perfectly for me now, but do you think that maybe in the future PaperMod could have a config option to switch between different content types?

@pfertyk pfertyk added the enhancement New feature or request label Apr 1, 2024
@adityatelange
Copy link
Owner

Hi, yes that's the default with all hugo themes: https://github.com/gohugoio/hugo/blob/a6e84391760ca3786bf580344e2a013ac54b4b4a/tpl/tplimpl/embedded/templates/twitter_cards.html#L3

Right now unsure how to solve this without adding a config variable. Lets see

@pfertyk
Copy link
Author

pfertyk commented Apr 14, 2024

I would be 100% OK with a config variable ;) I'm not sure how many content options are there for Twitter cards, but maybe it could just be a flag (use_summary_large_image, default true) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants