refactor(content-blog): replace reading-time with Intl.Segmenter API (#11138)

Co-authored-by: sebastien <lorber.sebastien@gmail.com>
This commit is contained in:
Shreedhar Bhat 2025-05-15 16:52:00 +05:30 committed by GitHub
parent c419d7ec88
commit 9f6360ba82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 96 additions and 69 deletions

View file

@ -63,7 +63,8 @@ export const DEFAULT_OPTIONS: PluginOptions = {
path: 'blog',
editLocalizedFiles: false,
authorsMapPath: 'authors.yml',
readingTime: ({content, defaultReadingTime}) => defaultReadingTime({content}),
readingTime: ({content, defaultReadingTime, locale}) =>
defaultReadingTime({content, locale}),
sortPosts: 'descending',
showLastUpdateTime: false,
showLastUpdateAuthor: false,