From 696ed22637bba3ad271192d7c06cb381a6d0dbf8 Mon Sep 17 00:00:00 2001 From: Mara Date: Fri, 24 Jan 2025 14:27:28 +0100 Subject: [PATCH] docs: update the banner & metadata info following the update that allow links in it --- docs/Settings/Embed.md | 11 ++++++++++- docs/index.md | 10 ++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/Settings/Embed.md b/docs/Settings/Embed.md index 90ce9f5..8eb07a7 100644 --- a/docs/Settings/Embed.md +++ b/docs/Settings/Embed.md @@ -33,13 +33,22 @@ Additionally, you can choose to send files based on a metadata field. This means > > ``` > --- -> banner: my_image.png +> banner: [[my_image.png]] > --- > ``` > > If you set the metadata `banner`, the image will be sent to the default attachment folder. All attachments supported by Obsidian (plus Markdown files) are supported. > This means that you can send images, pdfs, audio files and any other types of files that are supported by Obsidian and are embedded in your notes. +> [!TIP] +> Using wikilink in the metadata is a more reliable way to send the file into your repository. +> If you needs to remove it, you should use a regex, like this: +> +> | Regex | Replacement | After | in code blocks | Example (Regex101) | +> |---------------------------------------------|--------------|---------|----------------|-----------------------------------------------------------------------------------------| +> | `/banner: \"[{2}(.*)\/(.*)\|(.*)]{2}\"\|/g` | `banner: $2` | `false` | `false` | [Keep only the name of the link that is set with path](https://regex101.com/r/FgdOLP/1) | +> | `/banner: "[](([^\)+)(?:\|[^]]+)?]]"\|/g` | `banner: $1` | `false` | `false` | [Same as above, but with a non path, alias optional](https://regex101.com/r/NkaFxE/1) | + This feature allows you to easily share all the necessary resources in your notes with your remote repository. ## Embed notes diff --git a/docs/index.md b/docs/index.md index 2613c20..aa1dbd9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -22,12 +22,10 @@ Enveloppe is a remarkable project that enables you to effortlessly transmit file 1. Install the plugins through Obsidian Community or [BRAT](https://github.com/TfTHacker/obsidian42-brat) 2. Configure the plugin options: - -- Repo name -- Your GitHub username -- The GitHub token (available [here](https://github.com/settings/tokens/new?scopes=repo)) -- The share key - + - Repo name + - Your GitHub username + - The GitHub token (available [here](https://github.com/settings/tokens/new?scopes=repo)) + - The share key 3. Add the sharing key as `true` in Obsidian's note frontmatter 4. Customize (or not) the folder options 5. Run the commands through the file menu or commands palette.