my website at ewancroft.uk
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(seo): use local MetaTags with fediverse support

Switch from @ewanc26/ui MetaTags to local version that supports
fediverse:creator meta tag via apInstanceUrl and apUsername props.

- Make instanceDomain and fediverseCreator reactive with $derived
- Export local MetaTags.svelte from seo/index.ts

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>

ewancroft.uk 6ebe0b71 6a4cdfe0

verified
+7 -4
+5 -3
src/lib/components/seo/MetaTags.svelte
··· 10 10 11 11 let { meta, siteMeta, apInstanceUrl, apUsername }: Props = $props(); 12 12 13 - const instanceDomain = apInstanceUrl ? new URL(apInstanceUrl).hostname : null; 14 - const fediverseCreator = 15 - apUsername && instanceDomain ? `${apUsername}@${instanceDomain}` : null; 13 + // Reactive computed values for fediverse:creator meta tag 14 + const instanceDomain = $derived(apInstanceUrl ? new URL(apInstanceUrl).hostname : null); 15 + const fediverseCreator = $derived( 16 + apUsername && instanceDomain ? `${apUsername}@${instanceDomain}` : null 17 + ); 16 18 17 19 // Merge with defaults 18 20 const finalMeta = $derived({
+2 -1
src/lib/components/seo/index.ts
··· 1 - export { MetaTags } from '@ewanc26/ui'; 1 + // Local MetaTags extends @ewanc26/ui's version with fediverse:creator support 2 + export { default as MetaTags } from './MetaTags.svelte';