Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 23, 2025

The social media sharing (og:image) was using the inverted white logo (org-i.svg) which doesn't show well on most social media backgrounds. This PR fixes the issue by adding custom Open Graph meta tags that use a dedicated PNG image (og-image.png) specifically created for social media sharing while keeping the white logo in the sidebar.

Problem

The Sphinx documentation was configured with html_logo = "_static/images/org-i.svg" (inverted/white logo) for display on the blue sidebar background. However, this same logo was being used for social media sharing (og:image), making it nearly invisible on typical social media backgrounds.

Solution

Added custom meta tags in the page template (docs/_templates/page.html) to override the og:image with a dedicated PNG image:

<meta property="og:image" content="{{ pathto('_static/images/og-image.png', 1) }}">
<meta property="og:image:type" content="image/png">
<meta property="og:image:alt" content="Ilustrace organizátora Python akcí">

Result

  • ✅ Social media sharing now uses the dedicated PNG image (og-image.png) optimized for social media
  • ✅ Sidebar continues to display the white logo (org-i.svg) on blue background
  • ✅ Proper relative paths are generated using Sphinx's pathto() function
  • ✅ All pages include the correct og:image meta tags with PNG format for better compatibility

Fixes #15.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Contributor Author

Copilot AI commented Aug 23, 2025

@honzajavorek 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@Copilot Copilot AI changed the title [WIP] Logo není vidět na social media Fix social media logo visibility by using black logo for og:image Aug 23, 2025
@Copilot Copilot AI requested a review from honzajavorek August 23, 2025 16:48
Copilot finished work on behalf of honzajavorek August 23, 2025 16:48
Copy link
Member

@honzajavorek honzajavorek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nepoužívej prosím XHTML tagy, dej tam obyčejné HTML5 tagy bez těch zavírátek na konci.

@honzajavorek
Copy link
Member

@copilot přečti si můj komentář v review a oprav to

Copy link
Contributor Author

Copilot AI commented Aug 23, 2025

Nepoužívej prosím XHTML tagy, dej tam obyčejné HTML5 tagy bez těch zavírátek na konci.

Done! Converted the XHTML-style meta tags to HTML5 format by removing the closing slashes. The tags now use proper HTML5 syntax. Commit: b2777ef

@Copilot Copilot AI requested a review from honzajavorek August 23, 2025 17:17
Copilot finished work on behalf of honzajavorek August 23, 2025 17:17
@honzajavorek
Copy link
Member

@copilot Nakonec jsem se rozhodl, že by v tom meta tagu mělo být spíš PNG. Vyrobil jsem PNG přímo pro tento účel a jmenuje se og-image.png, pushnul jsem ho tady do té tvojí větve. Změň prosím cestu k souboru.

Copy link
Contributor Author

Copilot AI commented Aug 23, 2025

@copilot Nakonec jsem se rozhodl, že by v tom meta tagu mělo být spíš PNG. Vyrobil jsem PNG přímo pro tento účel a jmenuje se og-image.png, pushnul jsem ho tady do té tvojí větve. Změň p...

Updated the og:image meta tag to use the new og-image.png file and changed the content type to image/png. The documentation builds successfully and the meta tags are correctly generated. Commit: 1f7b8b1

@Copilot Copilot AI changed the title Fix social media logo visibility by using black logo for og:image Fix social media logo visibility by using dedicated PNG image for og:image Aug 23, 2025
Copilot finished work on behalf of honzajavorek August 23, 2025 17:29
@honzajavorek honzajavorek marked this pull request as ready for review August 23, 2025 18:02
@honzajavorek honzajavorek merged commit 52da0d5 into master Aug 23, 2025
3 checks passed
@honzajavorek honzajavorek deleted the copilot/fix-15 branch August 23, 2025 18:02
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

Successfully merging this pull request may close these issues.

Logo není vidět na social media
2 participants