DocFrontMatterSchema export #10700
Replies: 1 comment 3 replies
-
In general we try to not expose too much as public API because it prevents us from doing breaking changes. However we are quite permissive in how we currently use exports, so technically you can import almost anything: "exports": {
"./lib/*": "./lib/*",
"./src/*": "./src/*",
}, Note that I'm very likely to remove those for v4. Be aware that importing internals can break at any time. We may even switch to Zod for example, and since it's not public API, we can do this in a minor version. utils-validation is also considered internals If you want us to publicly expose something and maintain semver retrocompatibility, we really need to understand better your motivations and design an explicit public API for the feature |
Beta Was this translation helpful? Give feedback.
-
Wondering if the DocFrontMatterSchema in the plugin-content-docs package could be exposed? Same would go for the schemas for pages, blogs, etc. Reason being is we'd like to validate front matter prior to running a docusaurus build. Otherwise I'll just construct the schema myself using the exports from utils-validation (would rather not since the schema could change on docusaurus' end).
Beta Was this translation helpful? Give feedback.
All reactions