mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-02 12:19:11 +00:00
Merge pull request #1635 from reflectionalist/patch-1
Document how to use relative paths (fix #1628)
This commit is contained in:
commit
aacde0d703
@ -32,21 +32,37 @@ You can suppress a link from being recognised by preceding it with `~`. For exam
|
|||||||
|
|
||||||
! External Links
|
! External Links
|
||||||
|
|
||||||
To link to an external website, type the full URL of the site:
|
To link to an external [[resource|https://en.wikipedia.org/wiki/Web_resource]] such as a website or a file, type its //full// [[URL|https://en.wikipedia.org/wiki/URL]], including the [[URI scheme|https://en.wikipedia.org/wiki/URI_scheme]] such as a protocol (e.g. `http://`, `file://`) or `mailto`:
|
||||||
|
|
||||||
```
|
```
|
||||||
http://tiddlywiki.com/
|
http://tiddlywiki.com/
|
||||||
|
|
||||||
[[TW5|http://tiddlywiki.com/]]
|
[[TW5|http://tiddlywiki.com/]]
|
||||||
|
|
||||||
|
[[Mail me|mailto:me@where.net]]
|
||||||
```
|
```
|
||||||
|
|
||||||
For this syntax to work, the URL has to be recognisable as an URL, including a protocol such as `http://` or `file://`. You can force an external link with the extended syntax:
|
For this syntax to work, the URL has to be recognisable as a URL. Otherwise, it is treated as a tiddler title. As a result, in case you want to link to a resource locatable using a relative path, use the extended syntax:
|
||||||
|
|
||||||
|
```
|
||||||
|
[ext[Open file|index.html]]
|
||||||
|
|
||||||
|
[ext[Open file|./index.html]]
|
||||||
|
|
||||||
|
[ext[Open file|../README.md]]
|
||||||
|
```
|
||||||
|
|
||||||
|
The extended syntax still works with full URLs, although in that case it is not necessary:
|
||||||
|
|
||||||
```
|
```
|
||||||
[ext[http://tiddlywiki.com]]
|
[ext[http://tiddlywiki.com]]
|
||||||
|
|
||||||
[ext[caption for link|http://tiddlywiki.com]]
|
[ext[TW5|http://tiddlywiki.com]]
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also use the extended syntax to force an external link:
|
||||||
|
|
||||||
|
```
|
||||||
[ext[Donate|bitcoin:1aabbdd....?amount=0.001]]
|
[ext[Donate|bitcoin:1aabbdd....?amount=0.001]]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user