Enhancement: Allow published field instead of draft fields #267

Closed
opened 2026-10-05 02:36:51 +02:00 by adam · 2 comments
Owner

Add the ability to invert the draft field as this allows SSGs to use published fields instead.

Add the ability to invert the `draft` field as this allows SSGs to use `published` fields instead. <!-- github-sync-id:1234813909 -->
adam closed this issue 2026-10-05 02:36:51 +02:00
Author
Owner

Screenshot 2022-05-13 at 08 56 48
Screenshot 2022-05-13 at 08 56 40

![Screenshot 2022-05-13 at 08 56 48](https://user-images.githubusercontent.com/2900833/168228321-cd7a6f35-a3ca-4925-b5c5-f864fdd350fe.png) ![Screenshot 2022-05-13 at 08 56 40](https://user-images.githubusercontent.com/2900833/168228331-653ddf26-6d25-4e08-ba84-020b2497ba16.png) <!-- github-comment-id:1125718360 -->
Author
Owner

The frontMatter.content.draftField setting will have a new property called invert which allows you to invert the logic. That way, you can make use of a published field instead of the standard draft field.

{
  "frontMatter.content.draftField": {
    "name": "published",
    "type": "boolean",
    "invert": true
  }
}
The `frontMatter.content.draftField` setting will have a new property called `invert` which allows you to invert the logic. That way, you can make use of a published field instead of the standard draft field. ```json { "frontMatter.content.draftField": { "name": "published", "type": "boolean", "invert": true } } ``` <!-- github-comment-id:1125719361 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#267