-
Notifications
You must be signed in to change notification settings - Fork 29
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
Is it possible to use the og:description for the regular meta description as well? #65
Comments
I believe it was an intentional design decision to not modify any content besides OpenGraph. We found other extensions tended to also mess with meta information and it caused painful conflicts. Additionally, it could pretty quickly expand the scope of this extension to include other meta customization outside of OpenGraph. You can however, inject global meta values using the |
Ah good point, that makes sense, thanks @Daltz333! |
I think it might be possible to consider a basic option to use the description we already generate as the default meta description, provided we don't deal with any special cases, overlaps or any other problems. Reopening for now, I think it would be best if there was a setting in |
Thanks for reopening @ItayZiv! May I ask if this is something you're planning to do in the foreseeable future? |
Please see PR #71 to do the first part of this: add a Boolean setting to |
This is great, thank you @hugovk! Quick question though: Would this a) override a manual meta description or b) create a duplicate or c) won't be applied at all? |
@msbt Let's test it out! How do you set manual meta description? |
Like this: .. meta::
:description: My manual description With that set, and I think it would be better to do c) only have the manual. Also testing #71 on a bigger set of docs I see we're also getting multiple meta descriptions for subpages too. I'll take a look. |
Totally agree with you on that, appreciate your efforts! |
Please see #72 to fix this! |
I'm open to adding support for meta descriptions to this extension, but want to make sure all of our bases are covered here. (#71 has been reverted while this decided). Default BehaviorWhen the description is automatically parsed from the text, it would be written to both Custom/Override BehaviorThe custom version overwrites the auto-generated version. .. meta::
:description: My manual description should work. Additionally, in Sphinx, just :description: My manual description should work as well. Sphinx automatically puts top level field lists in the context meta. :og:description: My manual description should continue to work as well. I'm not sure on how to reconcile this on the following questions:
I'm inclined to keep them both separate but that would mean duplicated overrides in rst pages. Note: The results of the aboves questions would apply in the future to overrides for |
No, use overridden
No, use overridden
We:
I'm also inclined to keep them separate. The reason is that whilst their contents will often be the same, it's possible they can be different as they're slightly different, semantically speaking. One is the title of the webpage, for browsers, the other is the title of the thing to be shared, for Facebook and so on.
Someone may wish to tweak one or both. So I suggest:
How's that sound? |
Sure, that sounds fine. |
Fun aside (source), <meta name="description" property="og:description" content="great description"> is allowed and works to set both to the same value. I don't think it's applicable / nice to shoehorn this into rst field lists though. |
Fun aside 2: Stack Overflow also combines some Twitter metadata with Open Graph metadata! <meta property="og:type" content= "website" />
<meta property="og:url" content="https://stackoverflow.com/questions/6203984/combining-the-meta-description-and-open-graph-protocol-description-into-one-tag"/>
<meta property="og:site_name" content="Stack Overflow" />
<meta property="og:image" itemprop="image primaryImageOfPage" content="https://cdn.sstatic.net/Sites/stackoverflow/Img/[email protected]?v=73d79a89bded" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:domain" content="stackoverflow.com"/>
<meta name="twitter:title" property="og:title" itemprop="name" content="Combining the meta description and Open Graph Protocol description into one tag" />
<meta name="twitter:description" property="og:description" itemprop="description" content="Is it possible to combine the meta description and Open Graph Protocol description…

&lt;meta name="description" content="My meta description copy." /&gt;
&lt;meta property="og:description" content..." /> |
Hi there! Grabbing the first piece of content and add it as
og:description
works fine, thanks a lot for that. I'm just curious if there is a way to also use this content as regularmeta name="description"
if nothing is specified otherwise viaWould be very nice to have, any pointers on how to achieve that?
The text was updated successfully, but these errors were encountered: