-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(contents): set list meta cache as static import
- Loading branch information
1 parent
1086167
commit 88f0d04
Showing
2 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
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,13 @@ | ||
import { type Locale } from '@/config/locale-config' | ||
import { type ListFolder, type MetaCacheItem } from '@/config/content-config' | ||
import article_en from './article-en.json' | ||
import article_zh from './article-zh.json' | ||
import cookbook_zh from './cookbook-zh.json' | ||
|
||
type MetaCacheMapKey = `${ListFolder}_${Locale}` | ||
|
||
export const metaCacheMap = new Map<MetaCacheMapKey, MetaCacheItem[]>([ | ||
['article_en', article_en as MetaCacheItem[]], | ||
['article_zh', article_zh as MetaCacheItem[]], | ||
['cookbook_zh', cookbook_zh as MetaCacheItem[]], | ||
]) |