@anglefeint/astro-theme 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anglefeint/astro-theme",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "description": "Anglefeint core theme package for Astro",
6
6
  "license": "MIT",
@@ -65,7 +65,7 @@ function templateFor({ slug, theme }) {
65
65
  return `---
66
66
  import type { GetStaticPaths } from 'astro';
67
67
  import ${layoutName} from '@anglefeint/astro-theme/layouts/${layoutName}.astro';
68
- import { SUPPORTED_LOCALES } from '../../i18n/config';
68
+ import { SUPPORTED_LOCALES } from '@anglefeint/astro-theme/i18n/config';
69
69
 
70
70
  export const getStaticPaths = (() => SUPPORTED_LOCALES.map((lang) => ({ params: { lang } }))) satisfies GetStaticPaths;
71
71
 
@@ -1,8 +1,8 @@
1
1
  import { mkdir, writeFile, access, readdir } from 'node:fs/promises';
2
2
  import { constants } from 'node:fs';
3
3
  import path from 'node:path';
4
+ import { SUPPORTED_LOCALES } from './i18n/locales.mjs';
4
5
 
5
- const SUPPORTED_LOCALES = ['en', 'ja', 'ko', 'es', 'zh'];
6
6
  const CONTENT_ROOT = path.resolve(process.cwd(), 'src/content/blog');
7
7
  const DEFAULT_COVERS_ROOT = path.resolve(process.cwd(), 'src/assets/blog/default-covers');
8
8
 
@@ -1,7 +1,11 @@
1
- export const SUPPORTED_LOCALES = ['en', 'ja', 'ko', 'es', 'zh'] as const;
2
- export type Locale = (typeof SUPPORTED_LOCALES)[number];
3
-
4
- export const DEFAULT_LOCALE: Locale = 'en';
1
+ import {
2
+ SUPPORTED_LOCALES as SUPPORTED_LOCALES_RUNTIME,
3
+ DEFAULT_LOCALE as DEFAULT_LOCALE_RUNTIME,
4
+ } from './locales.mjs';
5
+
6
+ export type Locale = 'en' | 'ja' | 'ko' | 'es' | 'zh';
7
+ export const SUPPORTED_LOCALES = SUPPORTED_LOCALES_RUNTIME as readonly Locale[];
8
+ export const DEFAULT_LOCALE: Locale = DEFAULT_LOCALE_RUNTIME as Locale;
5
9
 
6
10
  export const LOCALE_LABELS: Record<Locale, string> = {
7
11
  en: 'English',
@@ -0,0 +1,3 @@
1
+ export const SUPPORTED_LOCALES = ['en', 'ja', 'ko', 'es', 'zh'];
2
+ export const DEFAULT_LOCALE = 'en';
3
+