mirror of
https://gitlab.com/MisterBiggs/brain-quartz.git
synced 2025-07-24 23:31:29 +00:00
.github
content
docs
quartz
cli
components
plugins
emitters
filters
draft.ts
explicit.ts
index.ts
transformers
index.ts
types.ts
vfile.ts
processors
static
styles
util
bootstrap-cli.mjs
bootstrap-worker.mjs
build.ts
cfg.ts
worker.ts
.gitattributes
.gitignore
.npmrc
.prettierignore
.prettierrc
CODE_OF_CONDUCT.md
Dockerfile
LICENSE.txt
README.md
globals.d.ts
index.d.ts
package-lock.json
package.json
quartz.config.ts
quartz.layout.ts
tsconfig.json
* fix: allow publish property to be a string (ExplicitPublish) Previously, the ExplicitPublish filter would publish if the `publish` property was truthy. The filter expects the `publish` property to be a boolean: ``` --- publish: true --- ``` However, Obsidian only shows the above if you are viewing a page in “Source” mode. If you are not in Source view, and you choose Three Dots Menu (...), “Add file property”, you will get a string, not a boolean. It seems likely that many users will do this and get: ``` publish: "true" ``` Notice that `"true"` is a string, not the boolean value `true`. If the user changes this to `"false"`, the page will still be published: ``` publish: "false" ``` That is because the string value `"false"` is truthy. This PR does the following: - Allows the `publish` property to be either a boolean or a string. - If it’s a string, it’s considered `true` if the string is `"true"` (not case-sensitive; it will also work if it is `"True"`, `"TRUE"`, etc.) - Guarantees that the returned value from `shouldPublish` is a `boolean` -- previously it could be any truthy value even though it was cast to `boolean` * style: use double-quotes everywhere * style: format according to project style guide