* 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
* Add option to allow embedding YouTube videos with Obsidian Markdown syntax
* Update Obsidian compatability doc page
* Switch to converting YT links as an html plugin
* Continue setup even if a file to delete is not found
For various reasons, `.gitkeep` may be deleted already.
(In my case, even though I followed the [Getting Started](https://quartz.jzhao.xyz) instructions exactly, my first run resulted in an `fatal: 'upstream' does not appear to be a git repository`)
If we try to delete `.gitkeep` again and don't ignore `ENOENT`, then the whole setup fails.
* Use fs.existsSync
* Added doc example to explorer sortFn
* Prettier fixed formatting
* Let Prettier fix the formatting of the entire markdown file
* Updated example
* Added extra commentary and fixed example
* Update docs/features/explorer.md
* doc fixes
* docs: remove leftover TODO
* docs: move example to `advanced`
---------
Co-authored-by: Sidney <85735034+Epicrex@users.noreply.github.com>
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
Co-authored-by: Ben Schlegel <ben5.schlegel@gmail.com>
* use slugs instead of title as basis for explorer
* fix folder persist state, better default behaviour
* use relative path instead of full path as full path is affected by -d
* dont use title in breadcrumb if it's just index lol