Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin-content-blog: add rejectPostsWithoutTruncate option #10289

Closed
1 of 2 tasks
felipecrs opened this issue Jul 12, 2024 · 6 comments · Fixed by #10375
Closed
1 of 2 tasks

plugin-content-blog: add rejectPostsWithoutTruncate option #10289

felipecrs opened this issue Jul 12, 2024 · 6 comments · Fixed by #10375
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.

Comments

@felipecrs
Copy link
Contributor

Have you read the Contributing Guidelines on issues?

Description

An option to make the docusaurus build fail if some blog post is missing truncate.

Has this been requested on Canny?

No response

Motivation

It's very often that we miss this during review and only realize it after the blog post is published.

It would be awesome and timesaving to allow to catch these issues during development time to avoid having them in production.

API design

I believe the description is self-explanatory.

Have you tried building it?

Not yet.

Self-service

  • I'd be willing to contribute this feature to Docusaurus myself.
@felipecrs felipecrs added feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. status: needs triage This issue has not been triaged by maintainers labels Jul 12, 2024
@Josh-Cena
Copy link
Collaborator

A personal +1

@Josh-Cena Josh-Cena removed the status: needs triage This issue has not been triaged by maintainers label Jul 12, 2024
@EliphazBouye
Copy link

EliphazBouye commented Jul 17, 2024

I'm going to work on it :) to add this feature

@felipecrs
Copy link
Contributor Author

That's awesome. By the way feel free to tweak the option name or UX if you believe it can be improved.

@slorber
Copy link
Collaborator

slorber commented Jul 25, 2024

What about a more flexible option like onUntruncatedBlogPost: "throw" | "warn" | "ignore" like we already have some other places?

This also gives the opportunity to eventually provide a callback with some args to apply different per-blog-post rules in the future.

If you have a better name suggestion, please let us know right now.

No PR has been sent so @OzakIOne is probably going to work on it

@felipecrs
Copy link
Contributor Author

I think it makes a lot of sense!

@felipecrs
Copy link
Contributor Author

Thanks a lot @OzakIOne and @slorber!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants