Skip to content

Commit

Permalink
add default description from project
Browse files Browse the repository at this point in the history
  • Loading branch information
simenandre committed Jun 20, 2023
1 parent c7c3d98 commit d6ae1a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/seo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import { urlFor } from '../data/sanity-client-browser';
export let title: string | undefined = undefined;
export let description: string | undefined = undefined;
export let data: MetaTagsProps = {};
export let seo: Seo | null = null;
Expand All @@ -23,7 +24,7 @@
<MetaTags
{...data}
titleTemplate={data.title ? '%s – Bjerk' : 'Bjerk - Digitale produktutviklere'}
description={seo?.description ?? data.description ?? defaultDescription}
description={seo?.description ?? description ?? data.description ?? defaultDescription}
openGraph={{
site_name: 'Bjerk',
title: seo?.title ?? data.title ?? 'Bjerk',
Expand Down
1 change: 1 addition & 0 deletions src/routes/(default)/projects/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<Seo
title={project.name}
description={project.description}
seo={project.seo}
defaultImage={`https://bjerk.io/assets/graph/${project.slug?.current}.png`}
/>
Expand Down

0 comments on commit d6ae1a1

Please sign in to comment.