How do I get The Open Graph protocol to work #8338
Unanswered
Atlas-Night-Out
asked this question in
Q&A
Replies: 1 comment
-
Hi @Atlas-Night-Out, To add a custom section inside the theme:
name: material
custom_dir: overrides Inside the {% extends "base.html" %}
{% block extrahead %}
<meta property="og:type" content="website">
<meta property="og:title" content="Customization - Material for MkDocs">
<meta property="og:description" content="Write your documentation in Markdown and create a professional static site in minutes – searchable, customizable, in 60+ languages, for all devices">
<meta property="og:image" content="https://squidfunk.github.io/mkdocs-material/assets/images/social/customization.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta content="https://squidfunk.github.io/mkdocs-material/customization/" property="og:url">
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:title" content="Customization - Material for MkDocs">
<meta property="twitter:description" content="Write your documentation in Markdown and create a professional static site in minutes – searchable, customizable, in 60+ languages, for all devices">
<meta property="twitter:image" content="https://squidfunk.github.io/mkdocs-material/assets/images/social/customization.png">
{% endblock %} Possible pain points, you're encountering:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
,
I'm hoping to get the Open Graph protocol into an MD file within the MKDOCS Theme Materials.
I keep looking at a lot of different code to try to add to my pages.
And not sure if I need to add overrides to the Theme or to just add it into each MD file at the top header.
I have also looked at a lot of links and info too but just not fully understanding how to add it, and hope someone can help me on this, as I tend to have to go to my web page just to use one page there that does work with Facebook Tags.
I'm also not sure about the structure in the overrides directory must mirror the directory structure of the original, as I already have an assets, CSS and image folder.
I also keep getting
The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags.
Error
when doing a Debug
So, not sure on my guesses for getting it into the MD files is wrong or not, but I will post for you to see what I'm guessing at.
<meta property=”og:title” content=”Dexcom G6/One” />
<meta property=”og:url” content=”https://atlas-night-out.github.io/Nightscout-xdrip-AAPS/” />
<meta property=”og:type” content=”website” />
<meta property=” og:description” content=” The Dexcom G6 is a continuous glucose monitoring (CGM) system designed for people with diabetes (Type 1, Type 2, or gestational). It provides real-time glucose readings without fingersticks” />
<meta property=”og:image” content=”https://github.com/user-attachments/assets/cb8931b9-d71a-468f-b2de-b861aa04f798” />
But I'm only getting an image that I do not tell it to use showing up in Sharing Debugger
Beta Was this translation helpful? Give feedback.
All reactions