mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-27 13:38:33 +02:00
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:
parent
f43be857d7
commit
a096bbc0b9
10 changed files with 189 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue