fix: clamp OG description width

This commit is contained in:
Peter Steinberger
2026-01-08 23:02:33 +01:00
parent 6811691055
commit 770bb3aeb8
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ export function buildSkillOgSvg(params: SkillOgSvgParams) {
const cardR = 34
const titleLines = wrapText(rawTitle, 22, 2)
const descLines = wrapText(rawDescription, 52, 3)
const descLines = wrapText(rawDescription, 42, 3)
const titleFontSize = titleLines.length > 1 || rawTitle.length > 24 ? 72 : 80
const titleY = titleLines.length > 1 ? 258 : 280
+1 -1
View File
@@ -19,7 +19,7 @@ describe('og helpers', () => {
expect(meta.url).toContain('/steipete/weather')
expect(meta.owner).toBe('steipete')
expect(meta.image).toContain('/og/skill.png?')
expect(meta.image).toContain('v=3')
expect(meta.image).toContain('v=4')
expect(meta.image).toContain('slug=weather')
expect(meta.image).toContain('owner=steipete')
expect(meta.image).toContain('version=1.2.3')
+1 -1
View File
@@ -16,7 +16,7 @@ type SkillMeta = {
const DEFAULT_SITE = 'https://clawdhub.com'
const DEFAULT_DESCRIPTION = 'ClawdHub — a fast skill registry for agents, with vector search.'
const OG_SKILL_IMAGE_LAYOUT_VERSION = '3'
const OG_SKILL_IMAGE_LAYOUT_VERSION = '4'
export function getSiteUrl() {
return import.meta.env.VITE_SITE_URL ?? DEFAULT_SITE