The draft status in Pelican is not a boolean, but a string. I have removed the default boolean option, but I really the toggle would be a great option.
Having an option/choice for the boolean to provide a string opposed to true/false would be a great solve. This would make the dashboard actually useful when looking for "In draft" articles.
The draft status in [Pelican](https://docs.getpelican.com/en/latest/content.html) is not a boolean, but a string. I have removed the default boolean option, but I really the toggle would be a great option.
Having an option/choice for the boolean to provide a string opposed to true/false would be a great solve. This would make the dashboard actually useful when looking for "In draft" articles.
<!-- github-sync-id:1034163569 -->
Might have to introduce a new setting for this in order to specify what field to use. So that the dashboard can check its type.
Sounds like a good functionality to improve.
Might have to introduce a new setting for this in order to specify what field to use. So that the dashboard can check its type.
<!-- github-comment-id:950672660 -->
In the content type, specify the field type to use for the draft field to draft instead of boolean.
Once both steps are completed, the dashboard will show tabs with the different specified choices, and instead of a toggle, it will show a dropdown.
Hi @apowell656,
The first implementation is completed.
In order for it to work, you need to do the following steps:
- Specify the new `frontMatter.content.draftField` setting, with for instance the following configuration:
```
"frontMatter.content.draftField": {
"name": "draft",
"type": "choice",
"choices": ["draft", "in progress", "published"]
}
```
- In the content type, specify the field type to use for the draft field to `draft` instead of `boolean`.
- Once both steps are completed, the dashboard will show tabs with the different specified choices, and instead of a toggle, it will show a dropdown.
<!-- github-comment-id:950797047 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The draft status in Pelican is not a boolean, but a string. I have removed the default boolean option, but I really the toggle would be a great option.
Having an option/choice for the boolean to provide a string opposed to true/false would be a great solve. This would make the dashboard actually useful when looking for "In draft" articles.
Sounds like a good functionality to improve.
Might have to introduce a new setting for this in order to specify what field to use. So that the dashboard can check its type.
Hi @apowell656,
The first implementation is completed.
In order for it to work, you need to do the following steps:
frontMatter.content.draftFieldsetting, with for instance the following configuration:draftinstead ofboolean.You are now able to test it out in the beta version.
@estruyf this works great! Thank you for adding this enhancement.
Thanks @apowell656 for verifying!