From ffd2c519c8171d980ccf6e6eee348cff564b4d7a Mon Sep 17 00:00:00 2001 From: Emily Hunt Date: Thu, 10 Oct 2024 15:34:01 +0200 Subject: [PATCH] Add automatically updating page titles --- src/lib/config.js | 3 ++ src/routes/+layout.svelte | 68 +++++++++++++++++++++++++--- src/routes/posts/[slug]/+page.js | 7 ++- src/routes/posts/[slug]/+page.svelte | 3 +- 4 files changed, 73 insertions(+), 8 deletions(-) diff --git a/src/lib/config.js b/src/lib/config.js index fafc8ff..2f817d5 100644 --- a/src/lib/config.js +++ b/src/lib/config.js @@ -1,3 +1,6 @@ +/* SITE SETTINGS */ +export const siteTitle = 'Dr. Emily L. Hunt'; + /* SOCIAL SETTINGS */ // Ensure that any icons are also in icons.js export const socials = { diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 9751831..2eaf905 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,26 +1,82 @@ -
+ + {head.title} + {#if head.description} + + {/if} + {#if head.keywords} + + {/if} + {#if head.author} + + {/if} + + +
- + {@render children()}
-