diff --git a/README.md b/README.md index 8e1f141..cb372ec 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,17 @@ assets and a [simplified favicon](static/img/community-favicon.svg). The desktop navbar and mobile menu. Keep the two mark variants geometrically identical. The green Docusaurus icon in the external link and footer still identifies the upstream project. +The default social share image is [community-social-card.png](static/img/community-social-card.png) +(1200 x 630). Its editable source is [community-social-card.svg](static/img/community-social-card.svg). +After editing the SVG, regenerate the PNG from the repository root with the existing Sharp dependency: + +```powershell +yarn node -e "require('sharp')('static\\img\\community-social-card.svg').png().toFile('static\\img\\community-social-card.png').catch(error => { console.error(error); process.exitCode = 1 })" +``` + +The site configuration uses the PNG for Open Graph and Twitter cards, since social crawlers do not +reliably support SVG previews. The image is intentionally fixed to the light brand palette. + ## Deployment Using SSH: diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 1d3330b..c59c47e 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -109,8 +109,7 @@ const config: Config = { themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ { - // Replace with your project's social card - image: 'img/docusaurus-social-card.jpg', + image: 'img/community-social-card.png', colorMode: { defaultMode: 'dark', disableSwitch: false, diff --git a/static/img/community-social-card.png b/static/img/community-social-card.png new file mode 100644 index 0000000..7d59965 Binary files /dev/null and b/static/img/community-social-card.png differ diff --git a/static/img/community-social-card.svg b/static/img/community-social-card.svg new file mode 100644 index 0000000..cfff5c7 --- /dev/null +++ b/static/img/community-social-card.svg @@ -0,0 +1,25 @@ + + + + + docusaurus.community + Building with + Docusaurus? + + Guides, plugins, and components + shared by people building sites like yours. + + + + + + + + + + + A little help with your next site. + Unofficial. Open source. Everyone's welcome. + docusaurus.community + +