diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-05 21:32:43 +0100 |
|---|---|---|
| committer | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-06 22:40:07 +0100 |
| commit | aba5b4e4879712b691532f855eb718d12dd5b9e5 (patch) | |
| tree | 102e3fec16e5d057c4c65a0a2e95a32d2a061bdd /src/pages | |
| parent | 08ec69cb378d67f31c11f1f934dd9ebdb32d0130 (diff) | |
Moves localeStaticPaths
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/[locale]/index.astro | 4 | ||||
| -rw-r--r-- | src/pages/[locale]/staticPaths.ts | 10 |
2 files changed, 2 insertions, 12 deletions
diff --git a/src/pages/[locale]/index.astro b/src/pages/[locale]/index.astro index 23a270d..7552cd0 100644 --- a/src/pages/[locale]/index.astro +++ b/src/pages/[locale]/index.astro @@ -1,12 +1,12 @@ --- import Layout from '../../layouts/Layout.astro'; -import staticPaths from './staticPaths'; +import localeStaticPaths from '../../lib/localeStaticPaths'; import translate from '../../i18n/translate'; import site from '../../i18n/translations/site'; import home from '../../i18n/translations/pages/home'; import type Locale from '../../types/Locale'; -export async function getStaticPaths() { return staticPaths; } +export async function getStaticPaths() { return localeStaticPaths; } const locale = Astro.params.locale as Locale; const t = translate(locale); diff --git a/src/pages/[locale]/staticPaths.ts b/src/pages/[locale]/staticPaths.ts deleted file mode 100644 index 266ad2c..0000000 --- a/src/pages/[locale]/staticPaths.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type Locale from '../../types/Locale'; - -// Defines what values to insert into the [locale] URL path parameter -// when generating a static site -const staticPaths: { params: { locale: Locale} }[] = [ - { params: { locale: 'sco' } }, - { params: { locale: 'en-GB' } }, -] - -export default staticPaths;
\ No newline at end of file |
