<script lang="ts">
	import { page } from '$app/stores';

	export let title: string;
	export let description: string;
	export let keywords: string;
	export let type: string;

	$: url = $page.url.href;
</script>

<svelte:head>
	<title>{title}</title>
    <!-- first line from "@context": "http://schema.org",-->
	<meta name="description" content={description} />
	{@html `<script type="application/ld+json">
        {
        "@context": "http://schema.org"
          "@type": "${type}",
            "name": "${title}",
            "keywords": "${keywords}"
            "description": "${description}",
            "url": "${url}",
        }
    </script>`}
</svelte:head>
