Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | // SPDX-FileCopyrightText: 2024-2026 Hack23 AB
// SPDX-License-Identifier: Apache-2.0
/**
* @module Types/Generation
* @description Types for the article generation pipeline — article options, metadata,
* sitemap entries, and generation statistics.
*/
import type { AnalysisPerspective, ArticleCategory } from './common.js';
/** Parsed article metadata from filename */
export interface ParsedArticle {
date: string;
slug: string;
lang: string;
filename: string;
}
/** Article source reference */
export interface ArticleSource {
title: string;
url: string;
}
/** Options for generating article HTML */
export interface ArticleOptions {
slug: string;
title: string;
subtitle: string;
date: string;
category: ArticleCategory;
readTime: number;
lang: string;
content: string;
keywords?: string[];
sources?: ArticleSource[];
analysisPerspectives?: AnalysisPerspective[];
}
/** Sitemap URL entry */
export interface SitemapUrl {
loc: string;
lastmod: string;
changefreq: string;
priority: string;
}
/** News article metadata entry */
export interface ArticleMetadataEntry {
filename: string;
date: string;
slug: string;
lang: string;
title: string;
description?: string;
type?: string;
}
/** News metadata database */
export interface NewsMetadataDatabase {
lastUpdated: string;
articles: ArticleMetadataEntry[];
}
/** Date range for article generation */
export interface DateRange {
start: string;
end: string;
}
/** Generation statistics */
export interface GenerationStats {
generated: number;
skipped: number;
dryRun: number;
errors: number;
articles: string[];
timestamp: string;
}
/** Generation result */
export interface GenerationResult {
success: boolean;
files?: number;
slug?: string;
error?: string;
}
|