diff options
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 |
