* 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
* 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
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 \_