jackyzha0 / quartz

🌱 a fast, batteries-included static-site generator that transforms Markdown content into fully functional websites
https://quartz.jzhao.xyz
MIT License
7.35k stars 2.54k forks source link

Explicit publish publishes when its not supposed to #1519

Closed LilTrublMakr closed 1 month ago

LilTrublMakr commented 1 month ago

Describe the bug Explicit publish will publish the page if there is anything in the publish portion in the frontmatter. The only way it will not publish is if the field is blank. Given the private pages of the documentation, I believe that it should only publish the page when publish is set to true.

To Reproduce

  1. Changed config file to filters: [Plugin.ExplicitPublish()],
  2. Added publish property to docs.
  3. Added false to the field (since I thought it was a true/false thing)
  4. Started a local server to test.
  5. Found page as published even with a false property.
  6. Changed publish to 9.
  7. Refreshed the local website.
  8. Page was still published.
  9. Deleted the contents of publish.
  10. Refreshed website.
  11. Page was not published.

Expected behavior The page should only publish if the publish property is set to true.

Desktop (please complete the following information):

Additional context N/A

saberzero1 commented 1 month ago

Can you check that the publish frontmatter in Obsidian is a boolean(checkbox) field? "false" is truthy in JavaScript.