Feature/og generator - #122
Open
mrhoodz wants to merge 4 commits into
Open
Conversation
👷 Deploy request for wwebjs pending review.Visit the deploys page to approve it
|
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.
📝 Overview
This PR introduces an automated Open Graph (OG) Social Card Image Generator for the documentation site and updates the site's favicon assets to SVG/ICO.
🎨 Design Case Study: View the mini case study on Behance.
✨ Key Changes
🎨 Design System & OG Social Card Generator
og-generator): Custom VuePress plugin (src/.vuepress/plugins/og-generator.js) hooking intoonInitializedto parse pages and build card assets.takumi-jspaired with custom fonts (Archivo Black & Poppins) to render 1834x963 template cards with page titles and descriptions./images/og-index.png) specifically for the homepage (/).sharpwith palette quantization and compression settings to produce lightweight PNG files without visual degradation.og:image,twitter:image, andtwitter:cardtags into each page's<head>.og:imagein its frontmatterhead.ogGeneratorPlugin()intosrc/.vuepress/config.jsandsrc/.vuepress/config/plugins.js.🏷️ Favicon Modernization
logo_16x16.png,logo_32x32.png,logo_shortcut.ico) with crisp vectorfavicon.svgandfavicon.icofallbacks.src/.vuepress/config/head.jsto reference the new icon formats with proper MIME types.🛠️ How It Works
og-generatorloads the background template (og-template.png) and font assets (ArchivoBlack-Regular.ttf&Poppins-Medium.ttf).takumi-js, compresses the PNG usingsharp, and writes the output to/images/og-gen/<page-slug>.png.og:image,twitter:image,twitter:card) into the page<head>.✅ Verification & Testing
npm run dev) complete without errors..pngassets output correctly topublic/images/og-gen/.og:image,twitter:image, andtwitter:cardmeta tags populate expected URLs.favicon.svgrenders correctly across modern browser tabs.