Giter Site home page Giter Site logo

Comments (5)

KiwiKilian avatar KiwiKilian commented on June 10, 2024

Thanks for your input! Does it detect the og image of your example in the post inspector? I think it's just an example, how they try to find the og image. It works successfully for me with the current output (without name="image", or did I miss another difference?). They also document it like without name.

The name attribute doesn't appear on most articles and docs on this topic. So I would rather opt for an option to overwrite the HTML output. This could look like this, allowing anybody to change the output HTML:

generateHTML: (outputUrl) => `<meta property="og:image" content="${outputUrl}" />`

from eleventy-plugin-og-image.

ddamato avatar ddamato commented on June 10, 2024

Does it detect the og image of your example in the post inspector?

No it uses the one for the homepage instead. Try with my latest post.

The og-image should have the title of the specific article rendered in the image, but it's using the homepage og-image instead. However, it's entirely possible it's just LinkedIn scraping my metadata incorrectly. I have the same problem with the title and description even after adding the name attributes as they've recommended.

from eleventy-plugin-og-image.

ddamato avatar ddamato commented on June 10, 2024

Ok yeah, issue is on my end. It wasn't rendering the correct absolute url. However, I'd appreciate your suggestion since the twitter metatags are different but I'd like to send the same image there also. Rendering the outputUrl in my template would be better than rendering the entire HTML, in my opinion.

from eleventy-plugin-og-image.

github-actions avatar github-actions commented on June 10, 2024

🎉 This issue has been resolved in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from eleventy-plugin-og-image.

KiwiKilian avatar KiwiKilian commented on June 10, 2024

@ddamato I've added the generateHTML option. You could just modify the markup generated by the shortcode. If you really just want to get the output path and generate the markup in your page templates you can use the capture approach. Or as most customizable variant, create a custom shortcode.

from eleventy-plugin-og-image.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.