Replies: 2 comments
-
Update: the sphinxext.opengraph folks are interested in having this functionality in their package. Here's the issue to track that: |
Beta Was this translation helpful? Give feedback.
-
I'm working on a new sphinx extension that mimics the mkdocs-material theme's builtin social plugin which supports (via insider's edition recent overhaul) customizable layouts. I have the customizable layouts (yaml-based jinja templates) working, but they could be improved for template inheritance (which is also working). I'm using 2bndy5/sphinx-social-cards; This feels like unintentional spam, but it is related to this topic 😃 My gripes about sphinxext-opengraph
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Many websites nowadays are adding the ability to dynamically generate large social media previews for the site. This boosts visibility and creates a professional look that is easier to quickly glance at. Here are a few examples:
GitHub
MkDocs Material
@jacobtomlinson 's blog
Usually, these are generated dynamically by a server when a page request is made, but I think that we could get this working statically by generating the images for each page at build time.
Idea
I think you could accomplish this via a Sphinx extension that did the following things:
conf.py
@media
query that was for the exact size of the social media card. These styles would just grab the elements we want in the image preview, and style/position them absolutely to look nice._static
meta
tag for theog:image
that pointed to this static imageBeta Was this translation helpful? Give feedback.
All reactions