* 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
* 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
* fix(breadcrumbs): problem with folder whitespace
use slugs for folder hrefs so folder paths get resolved properly
* feat: only use `slug` for constructing crumbs
* fix: remove capitalization
* fix: Fix `Backlinks` not applying the display class
Fix#518
* fix: Apply `displayClass` to all layout components
* refactor: Use same style
* fix: Remove `undefined` class using coalescing operator
ox-hugo currently supports the following syntax for latex equations:
- https://orgmode.org/manual/LaTeX-fragments.html
- https://ox-hugo.scripter.co/doc/equations
This syntax is supported by mathjax as is mentioned in the ox-hugo documentation.
But quartz uses remark-math which has some issues with the \( \) syntax.
See https://github.com/remarkjs/remark-math/issues/39
This change adds few more transformations to the OxHugoFlavouredMarkdown
plugin, which makes a best effort conversion of this syntax into what
the Quartz Latex transformer plugin supports.
With these changes, the generated files show latex formatting with
default quartz configuration.
Sidenote on `\_` escape by ox-hugo:
ox-hugo escapes, _ using \_, we match against it after we transform
equations into what quartz supports($$ and $).
This could be achieved using lookaround like regex as follows
```js
(?<=(\$|\$\$)[\s\S]*) -> Positive lookbehind for $ or $$
\\_ -> Matches \_
(?=[\s\S]*(?:\1)) Positive lookahead for $ or $$ if matched
const escapedUnderscoreRegex = new RegExp(/(?<=(\$|\$\$)[\s\S]*)\\_(?=[\s\S]*(?:\1))/, "g")
````
But since lookahead/behind can slow things down on large files, we just
look up all equations with $ and $$ delimiters and then try replacing \_
* fix(explorer): default sortFn implementation (#511)
* fix: use `numeric` + `base` for localeCompare
* docs(explorer): update default sortFn
* fix: better and more responsive tag behavior
* tags css moved to TagList.tsx
* used npm run format
* merged tag declarations
---------
Co-authored-by: Ben Schlegel <31989404+benschlegel@users.noreply.github.com>