diff --git a/build/blog.ts b/build/blog.ts index 708cd599084f..d88e2949c6c8 100644 --- a/build/blog.ts +++ b/build/blog.ts @@ -344,8 +344,18 @@ export async function buildBlogPosts(options: { } } +interface BlogPostDoc { + url: string; + rawBody: string; + metadata: BlogPostMetadata & { locale: string }; + isMarkdown: boolean; + fileInfo: { + path: string; + }; +} + export async function buildPost( - document + document: BlogPostDoc ): Promise<{ doc: Doc; liveSamples: any }> { const { metadata } = document; @@ -358,7 +368,7 @@ export async function buildPost( let $ = null; const liveSamples: LiveSample[] = []; - [$] = await kumascript.render(document.url, {}, document); + [$] = await kumascript.render(document.url, {}, document as any); const liveSamplePages = await kumascript.buildLiveSamplePages( document.url, @@ -402,8 +412,6 @@ export async function buildPost( throw error; } - doc.modified = metadata.modified || null; - doc.pageTitle = `${doc.title} | MDN Blog`; doc.noIndexing = false;