Support invert Property for Boolean Type Fields in contentTypes
configuration
#916
chriskyfung
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to suggest adding support for the
invert
property for boolean type fields in thefrontMatter.taxonomy.contentTypes
configuration. This feature would allow users to invert the logic of boolean fields, making it easier to handle scenarios where the absence of a field should be interpreted asfalse
.Use Case
A common scenario where this feature would be useful is when a user wants to exclude a page from the sitemap. In Jekyll, this can be achieved using the
jekyll-sitemap
plugin by addingsitemap: false
to the page front matter. Here is an example:Current Issue
Currently, when defining a boolean field in the
frontMatter.taxonomy.contentTypes
configuration as follows:The behaviors in the editor panel:
sitemap: true
in the front matter.sitemap
field from the front matter.These behaviors do not allow for the explicit setting of
sitemap: false
, which is necessary to exclude a page from the sitemap.Proposed Solution
By adding support for the
invert
property, users could define the boolean field as follows:With this configuration:
sitemap: false
in the front matter.sitemap
field from the front matter.This would allow users to explicitly set
sitemap: false
to exclude a page from the sitemap, aligning with the behavior of thejekyll-sitemap
plugin.Benefits
Supporting the
invert
property for boolean type fields in thefrontMatter.taxonomy.contentTypes
configuration would be a valuable addition, enabling users to better manage their content and configurations. I hope you consider this feature request for future updates.Beta Was this translation helpful? Give feedback.
All reactions