mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
feat: enhance SEO for home, recent, and paste pages
This commit is contained in:
@@ -216,11 +216,17 @@
|
||||
|
||||
<svelte:head>
|
||||
<title>Create a Paste - Sharpbin</title>
|
||||
<meta name="description" content="Create and share code snippets, and text instantly with Sharpbin. Supports syntax highlighting, encryption, expiry, and more." />
|
||||
<meta name="robots" content="index, follow" />
|
||||
<link rel="canonical" href={data.url} />
|
||||
<meta property="og:title" content="Create a Paste - Sharpbin" />
|
||||
<meta property="og:description" content="Create and share your pastes easily with Sharpbin." />
|
||||
<meta property="og:description" content="Create and share code snippets, and text instantly with Sharpbin. Supports syntax highlighting, encryption, expiry, and more." />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content={data.url} />
|
||||
<meta property="og:site_name" content="Sharpbin" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:title" content="Create a Paste - Sharpbin" />
|
||||
<meta name="twitter:description" content="Create and share code snippets, and text instantly with Sharpbin." />
|
||||
</svelte:head>
|
||||
|
||||
<main
|
||||
|
||||
@@ -507,15 +507,19 @@
|
||||
: 'Paste Not Found - Sharpbin'}</title
|
||||
>
|
||||
{#if data.paste}
|
||||
<meta property="og:title" content={data.paste.title || 'Untitled Paste'} />
|
||||
<meta
|
||||
property="og:description"
|
||||
content={`A ${syntaxes[data.paste.syntax].name} paste on Sharpbin created by ${
|
||||
{@const pasteDescription = `A ${syntaxes[data.paste.syntax].name} paste on Sharpbin created by ${
|
||||
data.paste.author ? data.paste.author.username : 'Anonymous'
|
||||
}, created on ${
|
||||
extractDateFromUUIDv7(data.paste.uuid)?.toLocaleDateString() ?? 'Unknown Date'
|
||||
} with ${data.paste.views} view${data.paste.views !== 1 ? 's' : ''}.`}
|
||||
/>
|
||||
<meta name="description" content={pasteDescription} />
|
||||
<meta name="robots" content={data.paste.visibility === 0 ? 'index, follow' : 'noindex, nofollow'} />
|
||||
<link rel="canonical" href={data.url} />
|
||||
{#if data.paste.author}
|
||||
<meta name="author" content={data.paste.author.username} />
|
||||
{/if}
|
||||
<meta property="og:title" content={data.paste.title || 'Untitled Paste'} />
|
||||
<meta property="og:description" content={pasteDescription} />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content={data.url} />
|
||||
<meta property="og:site_name" content="Sharpbin" />
|
||||
@@ -526,7 +530,11 @@
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:image" content={pasteImageUrl} />
|
||||
{:else}
|
||||
<meta name="twitter:card" content="summary" />
|
||||
{/if}
|
||||
<meta name="twitter:title" content={data.paste.title || 'Untitled Paste'} />
|
||||
<meta name="twitter:description" content={pasteDescription} />
|
||||
<meta
|
||||
property="og:article:published_time"
|
||||
content={extractDateFromUUIDv7(data.paste.uuid)?.toISOString() ?? ''}
|
||||
|
||||
@@ -19,6 +19,16 @@
|
||||
<svelte:head>
|
||||
<title>Recent Pastes - Sharpbin</title>
|
||||
<meta name="description" content="Browse the most recent pastes shared on Sharpbin." />
|
||||
<meta name="robots" content="noindex, follow" />
|
||||
<link rel="canonical" href={data.url} />
|
||||
<meta property="og:title" content="Recent Pastes - Sharpbin" />
|
||||
<meta property="og:description" content="Browse the most recent pastes shared on Sharpbin." />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content={data.url} />
|
||||
<meta property="og:site_name" content="Sharpbin" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:title" content="Recent Pastes - Sharpbin" />
|
||||
<meta name="twitter:description" content="Browse the most recent pastes shared on Sharpbin." />
|
||||
</svelte:head>
|
||||
|
||||
<main
|
||||
|
||||
Reference in New Issue
Block a user