diff options
| -rw-r--r-- | src/lib/localeStaticPaths.ts (renamed from src/pages/[locale]/staticPaths.ts) | 6 | ||||
| -rw-r--r-- | src/pages/[locale]/index.astro | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/pages/[locale]/staticPaths.ts b/src/lib/localeStaticPaths.ts index 266ad2c..55c3d9a 100644 --- a/src/pages/[locale]/staticPaths.ts +++ b/src/lib/localeStaticPaths.ts @@ -1,10 +1,10 @@ -import type Locale from '../../types/Locale'; +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} }[] = [ +const localeStaticPaths: { params: { locale: Locale} }[] = [ { params: { locale: 'sco' } }, { params: { locale: 'en-GB' } }, ] -export default staticPaths;
\ No newline at end of file +export default localeStaticPaths; 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); |
