1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 02:19:55 +00:00

Merge pull request #1635 from reflectionalist/patch-1

Document how to use relative paths (fix #1628)
This commit is contained in:
Jeremy Ruston 2015-04-04 08:35:36 +01:00
commit aacde0d703

View File

@ -32,21 +32,37 @@ You can suppress a link from being recognised by preceding it with `~`. For exam
! 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/
[[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[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]]
```