Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Allow published field instead of draft fields #336

Closed
estruyf opened this issue May 13, 2022 · 2 comments
Closed

Enhancement: Allow published field instead of draft fields #336

estruyf opened this issue May 13, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@estruyf
Copy link
Owner

estruyf commented May 13, 2022

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

@estruyf estruyf added the enhancement New feature or request label May 13, 2022
@estruyf
Copy link
Owner Author

estruyf commented May 13, 2022

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

@estruyf
Copy link
Owner Author

estruyf commented May 13, 2022

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
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant