Extract svelte seo to a component

This commit is contained in:
Leonardo Murça 2023-01-03 16:19:45 -03:00
parent 1962f9faad
commit 5eb4540600
2 changed files with 32 additions and 28 deletions

View file

@ -1,35 +1,11 @@
<script>
import SvelteSeo from "svelte-seo";
import FileViewer from "./lib/FileViewer.svelte";
import thumbnail from "./assets/thumbnail.webp";
import Footer from "./lib/Footer.svelte";
import Seo from "./lib/Seo.svelte";
import Header from "./lib/Header.svelte";
const title = "Embroidery Viewer";
const description = "A free online tool to view embroidery files.";
const keywords =
"Free Emrbroidery Viewer, embroidery design, sewing machine, preview .pes files, preview embroider designs, brother machine.";
import FileViewer from "./lib/FileViewer.svelte";
import Footer from "./lib/Footer.svelte";
</script>
<SvelteSeo {title} {description} {keywords} />
<SvelteSeo
openGraph={{
title,
description,
url: "https://embroideryviewer.xyz/",
type: "website",
images: [
{
url: thumbnail,
width: 1200,
height: 630,
alt: "Embroidery viewer thumbnail.",
},
],
}}
/>
<Seo />
<Header />
<main>
<FileViewer />

28
src/lib/Seo.svelte Normal file
View file

@ -0,0 +1,28 @@
<script>
import SvelteSeo from "svelte-seo";
import thumbnail from "../assets/thumbnail.webp";
const title = "Embroidery Viewer";
const description = "A free online tool to view embroidery files.";
const url = "https://embroideryviewer.xyz/";
const type = "website";
const keywords =
"Free Emrbroidery Viewer, embroidery design, sewing machine, preview .pes files, preview embroider designs, brother machine.";
const embroideryViewerThumbnail = {
url: thumbnail,
width: 1200,
height: 630,
alt: "Embroidery viewer thumbnail.",
};
</script>
<SvelteSeo {title} {description} {keywords} />
<SvelteSeo
openGraph={{
title,
description,
url,
type,
images: [embroideryViewerThumbnail],
}}
/>