Updated: Sunday, August 27,2023-08-27 14:54:13

main
System Administrator 2023-08-27 14:54:13 -04:00
parent 7cf8e7f968
commit 09ae9a8210
1 changed files with 50 additions and 0 deletions

View File

@ -54,6 +54,56 @@ dg-pinned: true
---
```
- **Custom Links:** This plugin supports setting custom links to a note, if you prefer something else than the default behaviour. This is done by adding a dg-permalink attribute to the frontmatter of your file. As an example, the top of your file could look like this:
```
---
dg-publish: true
dg-permalink: "mynote"
---
```
This will make the URL to your note be "{Your-Garden-Name}.netlify.app/mynote/". You can still use normal obsidian links as before to link to it. These will be automatically corrected once you publish a note with the permalink attribute. Same goes for deleting the attribute. Doing so will result in the note using the default URL. All links in other notes should automatically be corrected and still work.
- **Permalinks with arbitrary level of folders deep:**
```
---
dg-permalink: "category/2022/mynote/"
---
```
- **File path :** If you want your note to appear in a different file structure than what you have in your vault, you can use the dg-path attribute, like so:
```
---
dg-path: "Advanced/Features.md"
---
```
More details about this is available in [05 Other Settings#Rewrite path for single note.](https://dg-docs.ole.dev/getting-started/05-other-settings/#rewrite-path-for-single-note)
- **Metatags :** Setting metatags for a note can be done by adding a dg-metatags attribute like so:
```
dg-metatags:
description: "some description"
"og:image": "https://example.com/someimage.png"
```
Note that there is a single space before the "description" field, **not** a tab.
This feature can be used if you want custom titles and images when sharing links in social media. Using the example below will add a title and an image that will be used when sharing the link in social media.
```
dg-metatags:
"og:title": "Title Appearing on Social Media Site"
"og:image": "https://example.com/someimage.png"
```
Read more about the [Open Graph Protocol](https://ogp.me/)
---
---