-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d596255
commit 9e34c39
Showing
12 changed files
with
180 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<script> | ||
import { page } from "$app/stores"; | ||
const FALLBACK_TITLE = "T18S"; | ||
$: metadata = $page.data.metadata ?? {}; | ||
</script> | ||
<svelte:head> | ||
{#key $page.url.pathname} | ||
<title>{metadata?.title ?? FALLBACK_TITLE}</title> | ||
{#if metadata.description} | ||
<meta name="description" content={metadata.description} /> | ||
{/if} | ||
{/key} | ||
</svelte:head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export interface Metadata { | ||
title: string; | ||
description: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
<script> | ||
import "$lib/app.css" | ||
import { locale, setLocale } from "$t18s"; | ||
import { DEFAULT_LOCALE } from "$lib/i18n/index.js"; | ||
import HrefLang from "$lib/i18n/HrefLang.svelte"; | ||
import { browser } from "$app/environment"; | ||
import "$lib/app.css" | ||
import Metadata from "$lib/seo/Metadata.svelte"; | ||
export let data; | ||
$: setLocale(data.locale); | ||
$: if(browser) document.documentElement.lang = $locale; | ||
</script> | ||
|
||
<Metadata /> | ||
<HrefLang defaultLocale={DEFAULT_LOCALE} /> | ||
|
||
<slot /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export function load() { | ||
/** @type {import("$lib/seo/MetadataTypes").Metadata} */ | ||
const metadata = { | ||
title: "$t18s Module Reference", | ||
description: "Reference documentation for the $t18s module that's provided by t18s.", | ||
}; | ||
|
||
return { metadata }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
site/src/routes/[[locale=locale]]/plugin-config/+page.server.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export function load() { | ||
/** @type {import("$lib/seo/MetadataTypes").Metadata} */ | ||
const metadata = { | ||
title: "Plugin Configuration", | ||
description: "Reference documentation for the configuration of the t18s vite plugin.", | ||
}; | ||
|
||
return { metadata }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export function load() { | ||
/** @type {import("$lib/seo/MetadataTypes").Metadata} */ | ||
const metadata = { | ||
title: "SEO", | ||
description: "A guide to avoiding common SEO pitfalls when working with t18s.", | ||
}; | ||
|
||
return { metadata }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export function load() { | ||
/** @type {import("$lib/seo/MetadataTypes").Metadata} */ | ||
const metadata = { | ||
title: "Syntax", | ||
description: "A guide to the ICU MessageFormat Syntax used by t18s.", | ||
}; | ||
|
||
return { metadata }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters