-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff64b2b
commit acd63b4
Showing
12 changed files
with
67 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,46 @@ | ||
<script lang="ts"> | ||
import type { WithContext, Thing } from 'schema-dts'; | ||
import { serializeSchema } from '../utils'; | ||
import { MetaTags, type MetaTagsProps } from 'svelte-meta-tags'; | ||
import type { Seo } from '../data/types'; | ||
import dedent from 'dedent'; | ||
import { urlFor } from '../data/sanity-client-browser'; | ||
export let schema: WithContext<Thing>; | ||
export let title: string | undefined = undefined; | ||
export let description: string | undefined = undefined; | ||
export let data: MetaTagsProps = {}; | ||
export let seo: Seo | null = null; | ||
export let defaultImage = '/assets/bjerk-default-seo.png'; | ||
export let image: string = seo?.image | ||
? urlFor(seo.image.asset).size(1200, 630).url() | ||
: defaultImage; | ||
data.title = data.title ?? title; | ||
const defaultDescription = dedent` | ||
Bjerk er et dialogdrevet byrå innen digital produktutvikling og programvareutvikling. | ||
De siste 12 årene har vi endret måten mennesker lærer, tenker, jobber, og kommuniserer | ||
innen eiendom, regnskap og forvaltning. | ||
`; | ||
</script> | ||
|
||
<svelte:head> | ||
{@html serializeSchema(schema)} | ||
</svelte:head> | ||
<MetaTags | ||
{...data} | ||
titleTemplate={data.title ? '%s – Bjerk' : 'Bjerk - Digitale produktutviklere'} | ||
description={seo?.description ?? description ?? data.description ?? defaultDescription} | ||
openGraph={{ | ||
site_name: 'Bjerk', | ||
title: seo?.title ?? data.title ?? 'Bjerk', | ||
description: seo?.description ?? data.description ?? defaultDescription, | ||
images: [ | ||
{ | ||
url: image | ||
} | ||
] | ||
}} | ||
twitter={{ | ||
cardType: 'summary_large_image', | ||
title: seo?.title ?? data.title ?? 'Bjerk', | ||
description: seo?.description ?? data.description ?? defaultDescription, | ||
image: image | ||
}} | ||
/> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters