fix: add and close #260 (meta tags)
This commit is contained in:
1 parent
7d5328901b
commit
075d7f4309
2 files changed
+7
No files matched your search
@@ -55,6 +55,7 @@ The following environment variables can be set to override the default settings:
|
||||
| Variable | Values | Default Value |
|
||||
| ------------------------------- | ------------------- | -------------------------------------- |
|
||||
| PUBLIC_INSTANCE_URL | URL | `lemmy.ml` |
|
||||
| PUBLIC_FAVICON | URL | `/img/logo-background.svg |
|
||||
| PUBLIC_LOCK_TO_INSTANCE | `bool` | `true` if `PUBLIC_INSTANCE_URL` is set |
|
||||
| PUBLIC_SSR_ENABLED | `bool` | `false` |
|
||||
| PUBLIC_MIGRATE_COOKIE | `bool` | `false` |
|
||||
|
||||
@@ -126,12 +126,18 @@
|
||||
<svelte:head>
|
||||
<title>{post.post_view.post.name}</title>
|
||||
<meta property="og:title" content={post.post_view.post.name} />
|
||||
<meta property="twitter:title" content={post.post_view.post.name} />
|
||||
<meta property="og:url" content={$page.url.toString()} />
|
||||
{#if isImage(post.post_view.post.url)}
|
||||
<meta property="og:image" content={post.post_view.post.url} />
|
||||
<meta property="twitter:card" content={post.post_view.post.url} />
|
||||
{:else if post.post_view.post.thumbnail_url}
|
||||
<meta property="og:image" content={post.post_view.post.thumbnail_url} />
|
||||
<meta property="twitter:card" content={post.post_view.post.thumbnail_url} />
|
||||
{/if}
|
||||
{#if post.post_view.post.body}
|
||||
<meta property="og:description" content={post.post_view.post.body} />
|
||||
<meta property="twitter:description" content={post.post_view.post.body} />
|
||||
{/if}
|
||||
</svelte:head>
|
||||
|
||||
|
||||
Reference in new issue
Block a user