1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-23 04:43:00 +00:00
Pepperminty-Wiki/docs/06.5-Interwiki-Links.md

26 lines
1.6 KiB
Markdown

# Inter-wiki Links
Pepperminty Wiki, as of v0.18, supports _inter-wiki links_. Such a link sends the user to another wiki elsewhere on the internet. This is configured via the `interwiki_index_location` setting, which should point to a CSV file (either as a file path or an absolute URL) that specifies the wikis that can be linked to. Here are some example inter-wiki links:
```markdown
- [[another_wiki:Apples]]
- [[trees:Apple Trees]]
- In the [[history:The Great Rainforest|rainforest]], lots of trees can be found.
- .... Text text text [[any prefix here:page name|Display text]] text text text ....
```
Note that the automatic page name correction doesn't work with inter-wiki links, so you'll need to get the casing exactly right (try using the vertical-bar `|` display text feature if you want to the display text to use a different casing to the actual page name.
The CSV file format is best explained with an example:
```csv
Name,Prefix,Root URL
Another Wiki,another_wiki,https://wiki.example.com/?page=%s
Tree Field Guide,trees,https://trees.bobsrockets.io/wiki/%s
History Wiki,history,https://history.seanssatellites.co.uk/#%s
Wiki Display Name,internal link prefix,url with %s in place of page name
Apt Link,apt,apt://%s
```
The top line is a header and is discarded by _Pepperminty Wiki_ (so you can put anything you like here).
The url can be any URI supported by the user's browser. The string `%s` will be replaced with the (url encoded) page name. To this end, you can use this feature for _any_ external service you like - it doesn't have to be a Pepperminty Wiki installation (or even a wiki at all)!