Skip to content

Commit

Permalink
✨ Add support for custom HTML and meta tags
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Jan 23, 2021
1 parent 946c9c3 commit 2b56dbd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/routes/_layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
</script>

<svelte:head>
{#if config["status-website"].customHeadHtml}
{@html config["status-website"].customHeadHtml}
{/if}
<link
rel="stylesheet"
href={`/themes/${(config["status-website"] || {}).theme || "light"}.css`}
Expand Down Expand Up @@ -34,6 +37,11 @@
<link rel={link.rel} href={link.href} media={link.media} />
{/each}
{/if}
{#if config["status-website"].metaTags}
{#each config["status-website"].metaTags as link}
<meta name={link.name} content={link.content} />
{/each}
{/if}
{#if config['status-website'].css}
{@html `<style>${config['status-website'].css}</style>`}
{/if}
Expand All @@ -42,6 +50,10 @@
{/if}
</svelte:head>

{#if config["status-website"].customBodyHtml}
{@html config["status-website"].customBodyHtml}
{/if}

<Nav {segment} />

<main class="container">
Expand Down

0 comments on commit 2b56dbd

Please sign in to comment.