Skip to content

Commit 770bb3a

Browse files
committed
fix: clamp OG description width
1 parent 6811691 commit 770bb3a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

server/og/skillOgSvg.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function buildSkillOgSvg(params: SkillOgSvgParams) {
8989
const cardR = 34
9090

9191
const titleLines = wrapText(rawTitle, 22, 2)
92-
const descLines = wrapText(rawDescription, 52, 3)
92+
const descLines = wrapText(rawDescription, 42, 3)
9393

9494
const titleFontSize = titleLines.length > 1 || rawTitle.length > 24 ? 72 : 80
9595
const titleY = titleLines.length > 1 ? 258 : 280

src/lib/og.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('og helpers', () => {
1919
expect(meta.url).toContain('/steipete/weather')
2020
expect(meta.owner).toBe('steipete')
2121
expect(meta.image).toContain('/og/skill.png?')
22-
expect(meta.image).toContain('v=3')
22+
expect(meta.image).toContain('v=4')
2323
expect(meta.image).toContain('slug=weather')
2424
expect(meta.image).toContain('owner=steipete')
2525
expect(meta.image).toContain('version=1.2.3')

src/lib/og.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type SkillMeta = {
1616

1717
const DEFAULT_SITE = 'https://clawdhub.com'
1818
const DEFAULT_DESCRIPTION = 'ClawdHub — a fast skill registry for agents, with vector search.'
19-
const OG_SKILL_IMAGE_LAYOUT_VERSION = '3'
19+
const OG_SKILL_IMAGE_LAYOUT_VERSION = '4'
2020

2121
export function getSiteUrl() {
2222
return import.meta.env.VITE_SITE_URL ?? DEFAULT_SITE

0 commit comments

Comments
 (0)