File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
packages/docusaurus-plugin-content-blog/src Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -210,11 +210,8 @@ async function parseBlogPostMarkdownFile({
210
210
}
211
211
}
212
212
213
- const defaultReadingTime : ReadingTimeFunction = ( {
214
- content,
215
- options,
216
- locale = 'en' ,
217
- } ) => calculateReadingTime ( content , { ...options , locale} ) ;
213
+ const defaultReadingTime : ReadingTimeFunction = ( { content, locale, options} ) =>
214
+ calculateReadingTime ( content , { ...options , locale} ) ;
218
215
219
216
async function processBlogSourceFile (
220
217
blogSourceRelative : string ,
Original file line number Diff line number Diff line change @@ -401,12 +401,12 @@ declare module '@docusaurus/plugin-content-blog' {
401
401
export type ReadingTimeFunction = ( params : {
402
402
/** Markdown content. */
403
403
content : string ;
404
+ /** Locale for word segmentation. */
405
+ locale : string ;
404
406
/** Front matter. */
405
407
frontMatter ?: BlogPostFrontMatter & { [ key : string ] : unknown } ;
406
408
/** Options for reading time calculation. */
407
409
options ?: ReadingTimeOptions ;
408
- /** Locale for word segmentation. */
409
- locale ?: string ;
410
410
} ) => number ;
411
411
412
412
/**
You can’t perform that action at this time.
0 commit comments