@@ -281,7 +281,7 @@ export async function buildBlogPosts(options: {
281
281
282
282
const url = `/${ locale } /blog/${ blogMeta . slug } /` ;
283
283
const renderUrl = `/${ locale } /blog/${ blogMeta . slug } ` ;
284
- const renderDoc = {
284
+ const renderDoc : BlogPostDoc = {
285
285
url : renderUrl ,
286
286
rawBody : body ,
287
287
metadata : { locale, ...blogMeta } ,
@@ -344,11 +344,11 @@ export async function buildBlogPosts(options: {
344
344
}
345
345
}
346
346
347
- interface BlogPostDoc {
347
+ export interface BlogPostDoc {
348
348
url : string ;
349
349
rawBody : string ;
350
350
metadata : BlogPostMetadata & { locale : string } ;
351
- isMarkdown : boolean ;
351
+ isMarkdown : true ;
352
352
fileInfo : {
353
353
path : string ;
354
354
} ;
@@ -368,7 +368,7 @@ export async function buildPost(
368
368
let $ = null ;
369
369
const liveSamples : LiveSample [ ] = [ ] ;
370
370
371
- [ $ ] = await kumascript . render ( document . url , { } , document as any ) ;
371
+ [ $ ] = await kumascript . render ( document . url , { } , document ) ;
372
372
373
373
const liveSamplePages = await kumascript . buildLiveSamplePages (
374
374
document . url ,
@@ -449,8 +449,12 @@ export async function buildBlogFeed(options: { verbose?: boolean }) {
449
449
description : post . description ,
450
450
author : [
451
451
{
452
- name : post . author ?. name || "The MDN Team" ,
453
- link : post . author ?. link ,
452
+ name :
453
+ ( typeof post . author === "string"
454
+ ? post . author
455
+ : post . author ?. name ) || "The MDN Team" ,
456
+ link :
457
+ typeof post . author === "string" ? post . author : post . author ?. link ,
454
458
} ,
455
459
] ,
456
460
date : new Date ( post . date ) ,
0 commit comments