mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-24 11:08:16 +08:00
16 lines
539 B
TypeScript
16 lines
539 B
TypeScript
import type { NotesDataOptions } from '@vuepress-plume/plugin-notes-data'
|
|
import type { PlumeThemeLocaleOptions } from '../shared/index.js'
|
|
import { resolveLocaleOptions } from './resolveLocaleOptions.js'
|
|
|
|
export function resolveNotesList(options: PlumeThemeLocaleOptions) {
|
|
const locales = options.locales || {}
|
|
const notesList: NotesDataOptions[] = []
|
|
|
|
for (const locale of Object.keys(locales)) {
|
|
const notes = resolveLocaleOptions(options, 'notes', locale, false)
|
|
notes && notesList.push(notes)
|
|
}
|
|
|
|
return notesList
|
|
}
|