Added RevisionCard

This commit is contained in:
2026-09-30 14:04:20 +02:00
parent 8ef3899782
commit c6023cf857
40 changed files with 431 additions and 72 deletions

View File

@@ -1,8 +1,8 @@
import { ARTICLES, PAGES, TAGS } from '../constants/collections'
import { ARTICLES, PAGES, RELEASES, TAGS } from '../constants/collections'
import { createDiagnostics } from '../diagnostics'
import type { Diagnostics } from '../diagnostics/types'
import { createContentReader } from './reader'
import type { ArticleEntry, Content, PageEntry, TagEntry } from './types'
import type { ArticleEntry, Content, PageEntry, ReleaseEntry, TagEntry } from './types'
interface CollectionReader<T> {
list(): Promise<string[]>
@@ -36,10 +36,11 @@ async function readAll<T>(
export async function loadContent(): Promise<Content> {
const { collections } = createContentReader()
const problems = createDiagnostics()
const [articles, pages, tags] = await Promise.all([
const [articles, pages, tags, releases] = await Promise.all([
readAll<ArticleEntry>(collections.articles, ARTICLES, problems),
readAll<PageEntry>(collections.pages, PAGES, problems),
readAll<TagEntry>(collections.tags, TAGS, problems),
readAll<ReleaseEntry>(collections.releases, RELEASES, problems),
])
return { articles, pages, tags, diagnostics: problems.list }
return { articles, pages, tags, releases, diagnostics: problems.list }
}