원클릭으로
static-site-seo-and-og
Add SEO meta tags, Open Graph, Twitter Card, canonical URLs, sitemap, and a generated OG image to a static site.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Add SEO meta tags, Open Graph, Twitter Card, canonical URLs, sitemap, and a generated OG image to a static site.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Apply senior UI/UX judgment to interfaces, user flows, interaction details, and product usability decisions.
Build, review, and extend Astro static sites — config, integrations, SEO, deployment to GitHub Pages.
Design system, visual language, tone, and UI conventions for comtechconsulting.dk — reference before adding any new UI, copy, or page to the site.
Apply senior-level engineering judgment to code review, implementation, debugging, refactoring, and delivery planning.
Advise on Confluence Cloud AI — Atlassian Intelligence, Rovo Chat, Rovo Chat macro, plan tier detection, and space-level AI scoping.
Configure and surface Rovo AI features in Confluence Cloud — Chat, custom Agents, Space Agent assignment, and space homepage CTA patterns.
| name | static-site-seo-and-og |
| description | Add SEO meta tags, Open Graph, Twitter Card, canonical URLs, sitemap, and a generated OG image to a static site. |
| version | 1.0.1 |
| tags | ["seo","open-graph","sitemap","astro","static-site","social-sharing"] |
| tool_agnostic | true |
| authors | ["Anders Hybertz"] |
| tested_on | [] |
Use this skill when a static marketing or consultancy site needs OG tags, a sitemap, canonical URLs, or a generated social sharing image.
Check the shared layout/shell for existing meta tags before adding anything. Look for:
<meta name="description"> — usually already present<link rel="canonical"> — usually missingog:* and twitter:* tags — usually missing on marketing sitesAstro.site (or equivalent) is set in the framework configFor Astro: ensure astro.config.mjs has site set to the canonical domain and output: 'static'. Add @astrojs/sitemap integration here.
import sitemap from '@astrojs/sitemap';
export default defineConfig({
site: 'https://yourdomain.com',
output: 'static',
trailingSlash: 'always',
integrations: [sitemap()],
});
Install: npm install @astrojs/sitemap
Add to the <head> of the shared layout. See templates/layout-og-block.astro for the full block.
Key points:
canonicalURL from new URL(Astro.url.pathname, Astro.site) — do not manually concatenate stringsog:image URL from new URL(ogImage, Astro.site) — same reasonogImage as an optional prop with a sensible default (/og-default.png)og:locale to match the site's language/region (en_DK for Danish-English)twitter:card should be summary_large_image when an og:image existsog:site_name — used by LinkedIn and some scrapers to display the brand name separately from the page title<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> — often missing entirely. Place it before font preconnects.Use the Pillow-based Python generator in scripts/og-generator.py. It produces a 1200x630 PNG suitable for summary_large_image.
Design spec that works for senior B2B consultancy sites:
Two-column layout geometry (critical — see pitfalls):
Run: python3 scripts/gen-og.py from the repo root. Output goes to public/og-default.png.
Fonts: Use system Arial Bold / Arial from /System/Library/Fonts/Supplemental/. Always provide a fallback to Helvetica and then ImageFont.load_default().
Add to public/robots.txt:
User-agent: *
Allow: /
Sitemap: https://yourdomain.com/sitemap-index.xml
Without this, Google is guessing at crawl permissions and may not discover the sitemap automatically.
npm run build
ls dist/og-default.png # image copied verbatim from public/
cat dist/sitemap-0.xml # all pages present, trailing slashes match config
grep og:image dist/index.html # absolute URL, not a relative path
og:image must be an absolute URL. new URL(ogImage, Astro.site) handles this. A relative path renders nothing on social platforms.@astrojs/sitemap requires site in the Astro config — it will silently produce nothing without it.pip3 install pillow.public/ and regenerate from the script.\n. Pillow renders both parts as separate layout lines — overprinting or bleed. Always word-wrap programmatically by testing draw.textlength() against LEFT_W.radius=5 (rounded rectangle). radius=999 produces pill shapes — acceptable visually, but rectangular with softened corners is preferred.nx = RIGHT_X + (rw - nw) // 2 per stat.(W - fw) // 2). Bottom-left placement reads as an afterthought.<text> element) collapses at 16px tab size. Use drawn SVG paths or polylines. For a <> mark, polyline chevrons work well: <polyline points="13,9 7,16 13,23" /> (left) and <polyline points="19,9 25,16 19,23" /> (right) on a 0 0 32 32 viewBox. Asymmetric opacity helps — left chevron full white, right at 55% opacity.After deploying, verify OG tags with one of these — do NOT use opengraph.xyz alone, it occasionally returns Bad Request for valid pages:
If a checker reports bad request but curl <URL> | grep og:image returns a valid absolute URL, the checker is wrong — the tags are fine.
templates/layout-og-block.astro — drop-in Astro Layout head block with OG, Twitter Card, canonicalscripts/og-generator.py — Pillow-based 1200x630 OG image generator, dark B2B style