feat(blog): add onUntruncatedBlogPosts blog options (#10375)

Co-authored-by: OzakIOne <OzakIOne@users.noreply.github.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
This commit is contained in:
ozaki 2024-08-09 16:48:44 +02:00 committed by GitHub
parent f43be857d7
commit a096bbc0b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 189 additions and 0 deletions

View file

@ -28,6 +28,7 @@ import {
shouldBeListed,
applyProcessBlogPosts,
generateBlogPosts,
reportUntruncatedBlogPosts,
} from './blogUtils';
import footnoteIDFixer from './remark/footnoteIDFixer';
import {translateContent, getTranslationFiles} from './translations';
@ -189,6 +190,10 @@ export default async function pluginContentBlog(
blogPosts,
processBlogPosts: options.processBlogPosts,
});
reportUntruncatedBlogPosts({
blogPosts,
onUntruncatedBlogPosts: options.onUntruncatedBlogPosts,
});
const listedBlogPosts = blogPosts.filter(shouldBeListed);
if (!blogPosts.length) {