Skip to content

Strict frontmatter validation #4591

@slorber

Description

@slorber

🚀 Feature

We should validate docs/blog/pages frontmatter against a Joi schema:

  • prevent the user to use bad frontmatter
  • display friendly error messages when this happens
  • allow unknown frontmatter (user can assign additional metadata to each doc)
  • unit-test this validation logic
  • try to use the frontmatter TS types in the theme?

Some initial work has been done in #4590 for Docs and Blog, but is not exhaustive as it was not really the point of this PR.

Asking for help from the community to get this work completed in a more exhaustive and polished way.

Please claim this issue if you are willing to help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty: starterIssues that are starter difficulty level, e.g. minimal tweaking with a clear test plan.featureThis is not a bug or issue with Docusausus, per se. It is a feature request for the future.good first issueIf you are just getting started with Docusaurus, this issue should be a good place to begin.help wantedAsking for outside help and/or contributions to this particular issue or PR.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions