You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have a simple MD file with an empty description frontmatter:
Expected behavior
Build and compile without an issue. (was working in the previous version)
Actual Behavior
ValidationError: "description" must be a string
at Object.exports.process (D:\Prototype\alpha72\node_modules\joi\lib\errors.js:184:16)
at Object.internals.entry (D:\Prototype\alpha72\node_modules\joi\lib\validator.js:150:26)
at Object.exports.entry (D:\Prototype\alpha72\node_modules\joi\lib\validator.js:27:30)
at internals.Base.validate (D:\Prototype\alpha72\node_modules\joi\lib\base.js:548:26)
at Object.internals.assert (D:\Prototype\alpha72\node_modules\joi\lib\index.js:225:27)
at Object.attempt (D:\Prototype\alpha72\node_modules\joi\lib\index.js:107:26)
at Object.assertDocFrontMatter (D:\Prototype\alpha72\node_modules\@docusaurus\plugin-content-docs\lib\docFrontMatter.js:22:28)
at Object.processDocMetadata (D:\Prototype\alpha72\node_modules\@docusaurus\plugin-content-docs\lib\docs.js:66:22)
at processVersionDoc (D:\Prototype\alpha72\node_modules\@docusaurus\plugin-content-docs\lib\index.js:89:35)
at Array.map (<anonymous>)
at loadVersionDocsBase (D:\Prototype\alpha72\node_modules\@docusaurus\plugin-content-docs\lib\index.js:96:45)
at async loadVersion (D:\Prototype\alpha72\node_modules\@docusaurus\plugin-content-docs\lib\index.js:100:34)
at async Promise.all (index 0)
at async Object.loadContent (D:\Prototype\alpha72\node_modules\@docusaurus\plugin-content-docs\lib\index.js:167:33) at async D:\Prototype\alpha72\node_modules\@docusaurus\core\lib\server\plugins\index.js:53:46
at async Promise.all (index 0)
It's indeed not correct to have empty descriptions indeed. I also just found this as a bug in our repository only after updating.
We basically convert our books from XML to MD via pandoc and I wasn't aware that in a few cases this was empty. But we solved it already on our side. Just wanted to bring it up.
I will try to do a bit more my best to find duplicate issues before reporting them ;-)
I must have overlooked them.
Activity
slorber commentedon Apr 21, 2021
This will be fixed in #4654
Also reported here: #4591 (comment)
However, can you explain the motivation for having an empty description in that doc?
The goal of this new validation system is to prevent users from doing weird things, and I believe it's a bit weird to use an empty doc description?
TomPeirs commentedon Apr 21, 2021
Thanks for pointing this out.
It's indeed not correct to have empty descriptions indeed. I also just found this as a bug in our repository only after updating.
We basically convert our books from XML to MD via pandoc and I wasn't aware that in a few cases this was empty. But we solved it already on our side. Just wanted to bring it up.
I will try to do a bit more my best to find duplicate issues before reporting them ;-)
I must have overlooked them.
slorber commentedon Apr 21, 2021
Np :)
We'll add support for retrocompatibility but maybe we'll remove this someday or emit some kind of warning instead