Go to file
Nate Silva 707124cbd6
fix: allow publish property to be a string (ExplicitPublish) (#667)
* 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
2024-01-02 15:19:19 -08:00
.github docs: update issue template 2023-12-20 10:05:00 -08:00
content re-add gitkeep to content 2023-12-11 15:34:21 -08:00
docs feat: allow embedding youtube videos with the obsidian markdown syntax (#665) 2024-01-02 10:49:14 -08:00
quartz fix: allow publish property to be a string (ExplicitPublish) (#667) 2024-01-02 15:19:19 -08:00
.gitattributes add gitattributes for windows 2023-08-02 20:59:56 -07:00
.gitignore feat: support configurable ws port and remote development (#429) 2023-08-27 17:39:42 -07:00
.npmrc add engines field 2023-08-20 08:57:56 -07:00
.prettierignore fix notes 2023-08-07 23:57:24 -07:00
.prettierrc Use semi: false for prettier config 2022-05-02 08:57:25 -07:00
CODE_OF_CONDUCT.md run prettier 2023-07-22 17:27:41 -07:00
Dockerfile feat: docker support for v4 (closes #530) 2023-10-08 09:59:18 -07:00
globals.d.ts run prettier 2023-07-22 17:27:41 -07:00
index.d.ts base path refactor to better support subpath hosting 2023-08-19 15:52:25 -07:00
LICENSE.txt add base structure 2021-07-18 09:35:42 -04:00
package-lock.json pkg: bump version to 4.1.4 2023-12-28 14:00:15 -08:00
package.json pkg: bump version to 4.1.4 2023-12-28 14:00:15 -08:00
quartz.config.ts fix: latex before syntax highlighting 2023-12-19 19:03:40 -08:00
quartz.layout.ts fix: dont show last page if folder 2024-01-01 14:20:34 -08:00
README.md fix: use proper full base for links.ts 2023-08-23 12:18:50 -07:00
tsconfig.json run prettier 2023-07-22 17:27:41 -07:00

Quartz v4

“[One] who works with the door open gets all kinds of interruptions, but [they] also occasionally gets clues as to what the world is and what might be important.” — Richard Hamming

Quartz is a set of tools that helps you publish your digital garden and notes as a website for free. Quartz v4 features a from-the-ground rewrite focusing on end-user extensibility and ease-of-use.

If you are looking for Quartz v3, you can find it on the hugo branch.

🔗 Read the documentation and get started: https://quartz.jzhao.xyz/

Join the Discord Community

Sponsors