mirror of
https://github.com/zadam/trilium.git
synced 2025-10-28 16:56:34 +01:00
docs(guide): improve and update supported syntax for Markdown import
This commit is contained in:
@@ -42,9 +42,4 @@ If you want to export protected notes, enter a protected session first! This wil
|
||||
|
||||
## Supported syntax
|
||||
|
||||
* [GitHub-Flavored Markdown](https://github.github.com/gfm/) is the main syntax that Trilium is following.
|
||||
* Images are supported. When exporting, images are usually kept in the basic Markdown syntax but will use the HTML syntax if the image has a custom width. Figures are always embedded as HTML.
|
||||
* Tables are supported with the Markdown syntax. If the table is too complex or contains elements that would render as HTML, the table is also rendered as HTML.
|
||||
* <a class="reference-link" href="../../Note%20Types/Text/Block%20quotes%20%26%20admonitions.md">Admonitions</a> are supported using GitHub's format.
|
||||
* Links are supported. “Reference links” (internal links that mirror a note's title and display its icon) are embedded as HTML in order to preserve the information on import.
|
||||
* Math equations are supported using `$` and `$$` syntaxes.
|
||||
See the dedicated page: <a class="reference-link" href="Markdown/Supported%20syntax.md">Supported syntax</a>
|
||||
@@ -0,0 +1,57 @@
|
||||
# Supported syntax
|
||||
[GitHub-Flavored Markdown](https://github.github.com/gfm/) is the main syntax that Trilium is following.
|
||||
|
||||
## Images
|
||||
|
||||
When exporting, images are usually kept in the basic Markdown syntax but will use the HTML syntax if the image has a custom width. Figures are always embedded as HTML.
|
||||
|
||||
## Tables
|
||||
|
||||
Simple tables are supported with the Markdown syntax. If the table is too complex or contains elements that would render as HTML, the table is also rendered as HTML.
|
||||
|
||||
## Links
|
||||
|
||||
Standard Markdown links are supported.
|
||||
|
||||
Trilium internal links (that mirror a note's title and display its icon) are embedded as HTML in order to preserve the information on import.
|
||||
|
||||
## Math equations
|
||||
|
||||
Both inline and display equations are supported, using the `$` and `$$` syntaxes.
|
||||
|
||||
## Admonitions
|
||||
|
||||
The Markdown syntax for admonitions as supported by Trilium is the one that GitHub uses, which is as follows:
|
||||
|
||||
```
|
||||
> [!NOTE]
|
||||
> This is a note.
|
||||
|
||||
> [!TIP]
|
||||
> This is a tip.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> This is a very important information.
|
||||
|
||||
> [!CAUTION]
|
||||
> This is a caution.
|
||||
```
|
||||
|
||||
There are currently no plans of supporting alternative admonition syntaxes such as `!!! note`.
|
||||
|
||||
## Wikilinks
|
||||
|
||||
Basic support for wikilinks has been added in v0.96.0:
|
||||
|
||||
* `[[foo/bar]]` will look for the `bar.md` file in the `foo` directory and turn it into an internal link.
|
||||
* `![[foo/baz.png]]` will look for the `baz.png` file in the `foo` directory and turn it into an image.
|
||||
|
||||
This feature is import-only, which means that it will turn wikilinks into Trilium-compatible syntax, but it will not export Trilium Notes into Markdown files with this syntax.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> The path to pages in wikilinks is resolved relatively to the _import root_ and not the current directory of the note. This is to be inline with other platforms that use wikilinks such as SilverBullet.
|
||||
>
|
||||
> The root path of the import is determined as follows:
|
||||
>
|
||||
> * If there is a single directory within the archive at root level, then that directory is considered the root.
|
||||
> * If there are multiple files & directories at root level, then the archive root (containing all of these items) is considered the root.
|
||||
@@ -52,20 +52,4 @@ These types were inspired by GitHub's support for this feature and there are cur
|
||||
|
||||
### Markdown support
|
||||
|
||||
The Markdown syntax for admonitions as supported by Trilium is the one that GitHub uses, which is as follows:
|
||||
|
||||
```
|
||||
> [!NOTE]
|
||||
> This is a note.
|
||||
|
||||
> [!TIP]
|
||||
> This is a tip.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> This is a very important information.
|
||||
|
||||
> [!CAUTION]
|
||||
> This is a caution.
|
||||
```
|
||||
|
||||
There are currently no plans of supporting alternative admonition syntaxes such as `!!! note`.
|
||||
See <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/Import%20%26%20Export/Markdown/Supported%20syntax.md">Supported syntax</a>.
|
||||
@@ -1,5 +1,5 @@
|
||||
# Slash Commands
|
||||
<figure class="image image-style-align-right"><img style="aspect-ratio:419/571" src="Slash Commands_image.png" width="419" height="571"></figure>
|
||||
<figure class="image image-style-align-right"><img style="aspect-ratio:419/571;" src="Slash Commands_image.png" width="419" height="571"></figure>
|
||||
|
||||
> [!NOTE]
|
||||
> This is a premium feature of the editor we are using (CKEditor) and we benefit from it thanks to an written agreement with the team. See <a class="reference-link" href="../Premium%20features.md">Premium features</a> for more information.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Text Snippets
|
||||
<figure class="image image-style-align-right"><img style="aspect-ratio:265/108" src="Text Snippets_image.png" width="265" height="108"></figure>
|
||||
<figure class="image image-style-align-right"><img style="aspect-ratio:265/108;" src="Text Snippets_image.png" width="265" height="108"></figure>
|
||||
|
||||
> [!NOTE]
|
||||
> This is a premium feature of the editor we are using (CKEditor) and we benefit from it thanks to an written agreement with the team. See <a class="reference-link" href="../Premium%20features.md">Premium features</a> for more information.
|
||||
|
||||
Reference in New Issue
Block a user