Skip to content

Commit

Permalink
#13 add jsonld
Browse files Browse the repository at this point in the history
  • Loading branch information
moritzebeling committed Sep 10, 2020
1 parent c41574f commit 5d8d336
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const config = {
svelteWrapper: (svelte) => {
svelte.preprocess = [
autoPreprocess({
preserve: ['ld+json'],
postcss: { plugins: [postcssImport()] },
// defaults: { style: 'postcss' },
defaults: { style: "scss" },
Expand Down
23 changes: 23 additions & 0 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,33 @@
metatags['og:url'] = 'https://robinweissenborn.de'; // site.url
metatags['og:image'] = 'image'; // site.image
metatags['og:locale'] = 'de_DE';
let jsonld = {
"@context": "https://schema.org",
"@type": "Person",
"workLocation": {
"@type": "PostalAddress",
"addressLocality": "", // site.contact.address1.city,
"postalCode": "", // site.contact.address1.zip,
"streetAddress": "", // site.contact.address1.street
},
"name": "", // site.contact.name,
"alternateName": "Robin Weissenborn", // replace ß with ss
"description": "", // site.description,
"additionalType": "Artist",
"email": "", // "mailto:"+site.contact.mail,
"image": "", // site.image,
"jobTitle": "", // "Graphic Designer",
"url": "", // site.url
};
</script>

<style type="text/scss" global>
@import "../static/global.css";
</style>

<svelte:head>
{@html '<script type="application/ld+json">'+ JSON.stringify(jsonld) + '</script>'}
</svelte:head>

<Router {routes} />

0 comments on commit 5d8d336

Please sign in to comment.