05 Other Settings

Slugify Note URL

The plugin "slugifies" your URLs by default. In essence this means that a note with the path "My Folder/My Note.md" will get the URL "my-folder/my-note".
You can disable this by turning this setting off.

Non-English Characters

Slugifying the URL causes some non-English characters, like Chinese characters, to disappear. Resulting in all notes getting an empty URL. If you've experienced this issue, disabling this setting should fix that.

CleanShot 2022-12-18 at 13.09.33@2x.png


Rewrite Paths

If you want your filepaths in the garden to differ from the vault path, you can add rewrite rules in the "Path Rewrite Rules" section. If, let's say, I want to change the Getting Started folder to instead be named "Quick Start" in the garden it would look like this:
CleanShot 2023-05-23 at 22.47.43@2x.png

CleanShot 2023-05-23 at 22.48.16@2x.png

After adding this, all affected notes should show up as changed in the publication center, allowing you to update them.

Protip

If you want all your digital garden notes to be in a folder, say "published" in your vault, but appear under the root of your website you can use a rule on the form"published:". That is the folder path, and a colon not followed by anything. All notes under the folder "published" wil then appear on your website like "example.com/mynote"

Rewrite path for single note.

You can also change the note on a per note basis. Using dg-path in the frontmatter, you can change where a note should be located in the garden. This will overwrite any rules that may apply to that note.
The dg-path property needs the entire filepath you want. For example, if I wanted the "Features" note to instead be located under the "Advanced" folder in the garden I would add the following frontmatter to it:

---
dg-path: "Advanced/Features.md"
---

Custom filters

If you want any of your content to be modified before publishing the note, you can add a filter.

CleanShot 2023-05-23 at 22.50.21@2x.png

For example say you want to hide text that is inside a specific pattern:

This is some normal text.

::: hidden
This is some private text that should not be published.
:::

You could then add the following filter.
:::hidden(.*\n)*?:::
CleanShot 2023-05-23 at 22.53.24@2x.png
It also supports Regex groups, meaning you can use $1, $2 etc in the replacement string to insert the first and second regex group and so on.

< Prev | Next: Updating the template >