mirror of
https://github.com/openclaw/clawhub.git
synced 2026-08-14 00:47:57 +00:00
fix: clamp OG description width
This commit is contained in:
@@ -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
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user