Repository navigation
docs: add Open Graph tags so shared links show the logo - #63
Merged
Merged
Conversation
The docs pages carried no Open Graph or Twitter card tags, so a shared link to the site previewed with a generic icon and no image. A Material template override (overrides/main.html) adds og:* and twitter:* tags to every page: the page title (the site name alone on the home page), the site description or a page's own description front matter, the canonical URL, and a 1280 x 640 PNG of the ignis lockup at docs/assets/social/ignis-social-preview.png. Previewers need an absolute raster URL, so the image is resolved against site_url rather than linked as SVG. mkdocs.yml points theme.custom_dir at overrides/, and the docs workflow now also triggers on overrides/** so template edits redeploy the site.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Open Graph and Twitter card tags to every docs page, so a shared link to https://thd-spatial-ai.github.io/ignis/ previews with the ignis logo instead of a generic icon.
overrides/main.htmlog:*andtwitter:*tags inextrahead.docs/assets/social/ignis-social-preview.pngmkdocs.ymltheme.custom_dir: overrides.github/workflows/docs.ymloverrides/**.Tag values:
og:titleis the page title followed by the site name, or the site name alone on the home page.og:descriptionis the page'sdescriptionfront matter, falling back tosite_description.og:urlis the page's canonical URL, andog:imageis the absolute URL of the PNG.Verification
mkdocs build --strictpasses.og:title"ignis",og:urlhttps://thd-spatial-ai.github.io/ignis/andog:imagehttps://thd-spatial-ai.github.io/ignis/assets/social/ignis-social-preview.png. A subpage carries, for example,og:title"API reference - ignis".Link previewers cache results. After deployment, a URL they have already seen may keep the old preview until their cache expires.