feat: source highlighting for code blocks

This commit is contained in:
2026-02-22 13:24:41 +01:00
parent ac75bcb1ac
commit b67ffbd38a
10 changed files with 432 additions and 47 deletions

View File

@@ -307,6 +307,8 @@ export class BlogGenerationEngine {
let sitemapWritten = false;
let rssWritten = false;
let atomWritten = false;
const generatedHashCache = new Map<string, string | null>();
const knownOutputDirectories = new Set<string>();
if (includeCore) {
onProgress(10, 'Writing sitemap and feeds...');
@@ -333,7 +335,10 @@ export class BlogGenerationEngine {
reportUnitProgress('Atom feed written');
onProgress(15, 'Copying assets...');
await copyPreviewAssets(htmlDir);
await copyPreviewAssets(htmlDir, {
projectId: options.projectId,
hashCache: generatedHashCache,
});
reportUnitProgress('Assets copied');
}
@@ -348,9 +353,6 @@ export class BlogGenerationEngine {
},
});
const knownOutputDirectories = new Set<string>();
const generatedHashCache = new Map<string, string | null>();
const writePage = (projectId: string, urlPath: string, content: string) => writeHtmlPage({
projectId,
htmlDir,