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

Add global og:description override #117

Open
wiktor-k opened this issue Dec 13, 2023 · 3 comments
Open

Add global og:description override #117

wiktor-k opened this issue Dec 13, 2023 · 3 comments

Comments

@wiktor-k
Copy link

Hi,

I'd like to keep my og:description in the Sphinx conf.py file and not clutter the input files.

I've used this to insert the tag:

ogp_custom_meta_tags = [
    f'<meta property="og:description" content="{description}" />',
]

Sadly the generator still inserts automated og:description parsed from the site that's completely irrelevant:

<meta property="og:description" content="2023-12-13 Introducing OpenPGP- What is OpenPGP?, Who is the audience for this document?, Why not just use the OpenPGP RFC?, Which version of OpenPGP does this address?., A high-level view- Why Ope..." />
<meta property="og:description" content="The essential OpenPGP guide for application developers. Learn the OpenPGP standard for cryptographic operations and how to implement it in your projects. Gain insights into digital signatures, key management, certificates, and more. Version agnostic." />

Is there a way to globally override og:description or completely disable the automated generation? (I've checked the README but couldn't find any leads).

Thanks for your help! 👋

@Daltz333
Copy link
Member

I'd probably argue you should just add your meta tags to a template. Overriding the description breaks one of the core reasons for this extension.

Can I ask what purpose you need to override for?

@wiktor-k
Copy link
Author

I'm actually happy with the rest of the tags that the extension inserts (the rest of the OpenGraph tags).

But as you mention it's possible to do the same via raw template markup (but then I'd be replicating most of what this extension provides eg generation of og:url).

For the record the site is at https://openpgp.dev/book/

If you consider this out of scope it's okay with me but I still wanted to clarify with you what would be the best approach. I hope you don't mind.

@Daltz333
Copy link
Member

@TheTripleV thoughts?

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

No branches or pull requests

2 participants