Comments (4)
Thank you for the info! I had no idea this was a thing, because I worked with Hugo a long time ago and didn't keep up with the new changes.
The benefit of adding the custom templates, which would allow you to use the cover.image
is that you wouldn't need to specify the image in two separate places, so for the sake of convenience I think it would still be worth merging.
Of course the other side of that coin is the fact that if you introduce this template you will need to keep it up to date with the changes made to the _internal
template, if you want to keep all the new funcionality/changes they add.
Ultimately, it's up to you, whether you choose to add it or not. Since I now know how to specify it using the base Hugo template, I can update my posts to work correctly, if you choose not to merge it.
And once again a huge thanks for taking the time and sharing this information with me! 🙏 You, sir, rock! 🤘
from hugo-papermod.
Hello @aghdom,
We already have implemented og, twitter cards, one need to set env
to production as mentioned in code below.
hugo-PaperMod/layouts/partials/head.html
Lines 50 to 55 in 2c7cffb
However the cover image linking is already under discussion #13 (comment)
The linked pull-request #31 will add duplicate code to the head section, we need more better implementation by overriding the hugo's internal template for both og as well as twitter-cards.
from hugo-papermod.
I have added stuff for this change => 6c4e094c91ce^...306889f
But I am unsure if this needs to be merged 🤔
Hugo has a way to include the image in images
It can be used in social meta just by adding cover
or thumbnail
in its name and it will show up 🎉
this won't work as hugo's (opengraph and twitter)'s template doesn't support relative urls, and I cannot fix that
Ah damn! that's disappointing. Looks like there are some fixes scattered on the internet. I'll try these
- https://discourse.gohugo.io/t/links-for-images-videos-audio-in-internal-templates-twitter-cards-and-opengraph/10464
- https://discourse.gohugo.io/t/how-to-set-open-graph-image-for-a-specific-page/6700/6
- https://www.telematika.org/post/adjusting-hugo-internal-open-graph-template/
Originally posted by @singhkays in #13 (comment)
@adityatelange The first link worked perfectly! I'll close this but you should think about implementing this in the theme by default. I can see the value add of specifying one of the images in the blog post as one of the OG or Twitter card images rather than storing these in a separate folder and then specifying the absolute path.
Originally posted by @singhkays in #13 (comment)
cc @aghdom @singhkays @kdkasad
from hugo-papermod.
The thing is I've tested the code with and without having template override the cover link needs to be with other params of twitter cards or same with opengraph, otherwise it would choose the image that is near to other params will be selected
So I think it should be replaced with _internal ones
from hugo-papermod.
Related Issues (20)
- [BUG] Render of "page" failed: HOT 1
- Output order CSS reversed since Hugo v0.123.0 HOT 1
- [BUG] Images quality was degraded HOT 3
- [BUG] Minified build errors with: expected comma character or an array or object ending on line... HOT 4
- Errors when updating PaperMod HOT 1
- Integratring Cactus Comments
- [BUG] Pipeline after Theme Switch button even with Single Language Sites HOT 3
- dead links in wiki HOT 1
- Is it possible to prevent specific pages from showing up in archive pages?
- [BUG]In the f5c737f version, using the `hugo --minify` command will report an error.
- Hierarchical menus? HOT 1
- [BUG] Build Error - expected comma character or an array HOT 1
- [BUG] HTML invalidator: Trailing slash on void elements
- [BUG] Wiki: Installation - Expand Method 4
- Social Icon Request: SpaceHey
- Make Twitter card's content value configurable HOT 2
- Support adding Link to footer for Privacy Policy or Footer HOT 3
- [BUG `googleAnalytics` was deprecated
- Social icon for exercism
- Hugo Aliases Not Working as Expected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hugo-papermod.