fix: hide onlycrabs branding
This commit is contained in:
parent
6c7dd2ec6d
commit
ac0bdf0375
@ -79,8 +79,8 @@ function wrapText(value: string, maxChars: number, maxLines: number) {
|
||||
}
|
||||
|
||||
export function buildSoulOgSvg(params: SoulOgSvgParams) {
|
||||
const rawTitle = params.title.trim() || 'onlycrabs.ai'
|
||||
const rawDescription = params.description.trim() || 'SOUL.md bundle on onlycrabs.ai.'
|
||||
const rawTitle = params.title.trim() || 'SoulHub'
|
||||
const rawDescription = params.description.trim() || 'SOUL.md bundle on SoulHub.'
|
||||
|
||||
const cardX = 72
|
||||
const cardY = 96
|
||||
|
||||
@ -46,10 +46,9 @@ async function ensureWasm() {
|
||||
await wasmInitPromise
|
||||
}
|
||||
|
||||
function buildFooter(host: string | null, slug: string, owner: string | null) {
|
||||
const base = host ? host : 'onlycrabs.ai'
|
||||
if (owner) return `${base}/@${owner}/${slug}`
|
||||
return `${base}/souls/${slug}`
|
||||
function buildFooter(slug: string, owner: string | null) {
|
||||
if (owner) return `@${owner}/${slug}`
|
||||
return `souls/${slug}`
|
||||
}
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
@ -75,9 +74,9 @@ export default defineEventHandler(async (event) => {
|
||||
const title = titleFromQuery || meta?.displayName || slug
|
||||
const description = descriptionFromQuery || meta?.summary || ''
|
||||
|
||||
const ownerLabel = owner ? `@${owner}` : 'onlycrabs.ai'
|
||||
const ownerLabel = owner ? `@${owner}` : 'SoulHub'
|
||||
const versionLabel = version ? `v${version}` : 'latest'
|
||||
const footer = buildFooter(getRequestHost(event), slug, owner || null)
|
||||
const footer = buildFooter(slug, owner || null)
|
||||
|
||||
const cacheKey = version ? 'public, max-age=31536000, immutable' : 'public, max-age=3600'
|
||||
setHeader(event, 'Cache-Control', cacheKey)
|
||||
|
||||
@ -35,7 +35,7 @@ describe('og helpers', () => {
|
||||
summary: 'Personal north star notes.',
|
||||
version: '0.1.0',
|
||||
})
|
||||
expect(meta.title).toBe('North Star — onlycrabs.ai')
|
||||
expect(meta.title).toBe('North Star — SoulHub')
|
||||
expect(meta.description).toBe('Personal north star notes.')
|
||||
expect(meta.url).toContain('/souls/north-star')
|
||||
expect(meta.owner).toBe('someone')
|
||||
@ -57,8 +57,8 @@ describe('og helpers', () => {
|
||||
|
||||
it('uses soul defaults when owner and summary are missing', () => {
|
||||
const meta = buildSoulMeta({ slug: 'signal' })
|
||||
expect(meta.title).toBe('signal — onlycrabs.ai')
|
||||
expect(meta.description).toMatch(/onlycrabs\.ai — the home for SOUL.md/i)
|
||||
expect(meta.title).toBe('signal — SoulHub')
|
||||
expect(meta.description).toMatch(/SoulHub — the home for SOUL.md/i)
|
||||
expect(meta.url).toContain('/souls/signal')
|
||||
expect(meta.owner).toBeNull()
|
||||
expect(meta.image).toContain('slug=signal')
|
||||
|
||||
@ -33,8 +33,7 @@ type SoulMeta = {
|
||||
}
|
||||
|
||||
const DEFAULT_DESCRIPTION = 'ClawdHub — a fast skill registry for agents, with vector search.'
|
||||
const DEFAULT_SOUL_DESCRIPTION =
|
||||
'onlycrabs.ai — the home for SOUL.md bundles and personal system lore.'
|
||||
const DEFAULT_SOUL_DESCRIPTION = 'SoulHub — the home for SOUL.md bundles and personal system lore.'
|
||||
const OG_SKILL_IMAGE_LAYOUT_VERSION = '5'
|
||||
const OG_SOUL_IMAGE_LAYOUT_VERSION = '1'
|
||||
|
||||
@ -125,9 +124,9 @@ export function buildSoulMeta(source: SoulMetaSource): SoulMeta {
|
||||
const displayName = clean(source.displayName) || clean(source.slug)
|
||||
const summary = clean(source.summary)
|
||||
const version = clean(source.version)
|
||||
const title = `${displayName} — onlycrabs.ai`
|
||||
const title = `${displayName} — SoulHub`
|
||||
const description =
|
||||
summary || (owner ? `Soul by @${owner} on onlycrabs.ai.` : DEFAULT_SOUL_DESCRIPTION)
|
||||
summary || (owner ? `Soul by @${owner} on SoulHub.` : DEFAULT_SOUL_DESCRIPTION)
|
||||
const url = `${siteUrl}/souls/${source.slug}`
|
||||
const imageParams = new URLSearchParams()
|
||||
imageParams.set('v', OG_SOUL_IMAGE_LAYOUT_VERSION)
|
||||
|
||||
@ -70,12 +70,12 @@ export function getSiteMode(): SiteMode {
|
||||
}
|
||||
|
||||
export function getSiteName(mode: SiteMode = getSiteMode()) {
|
||||
return mode === 'souls' ? 'onlycrabs.ai' : 'ClawdHub'
|
||||
return mode === 'souls' ? 'SoulHub' : 'ClawdHub'
|
||||
}
|
||||
|
||||
export function getSiteDescription(mode: SiteMode = getSiteMode()) {
|
||||
return mode === 'souls'
|
||||
? 'onlycrabs.ai — the home for SOUL.md bundles and personal system lore.'
|
||||
? 'SoulHub — the home for SOUL.md bundles and personal system lore.'
|
||||
: 'ClawdHub — a fast skill registry for agents, with vector search.'
|
||||
}
|
||||
|
||||
|
||||
@ -336,7 +336,7 @@ function OnlyCrabsHome() {
|
||||
<div className="hero-inner">
|
||||
<div className="hero-copy fade-up" data-delay="1">
|
||||
<span className="hero-badge">SOUL.md, shared.</span>
|
||||
<h1 className="hero-title">onlycrabs.ai, where system lore lives.</h1>
|
||||
<h1 className="hero-title">SoulHub, where system lore lives.</h1>
|
||||
<p className="hero-subtitle">
|
||||
Share SOUL.md bundles, version them like docs, and keep personal system lore in one
|
||||
public place.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user