diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-05-31 08:36:45 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axilleas@axilleas.me> | 2016-08-02 12:59:01 +0300 |
commit | f0b73f81198a9cba8961774f45e0b96f0cb73c78 (patch) | |
tree | cedf93c09fb13bbdb1669d4265b4b496d3454a49 /doc | |
parent | 632113e43cc3296759b11dc20b1b7f2f056278f0 (diff) |
Add help document describing wiki linking behavior.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/markdown/markdown.md | 4 | ||||
-rw-r--r-- | doc/markdown/wiki.md | 77 |
2 files changed, 81 insertions, 0 deletions
diff --git a/doc/markdown/markdown.md b/doc/markdown/markdown.md index c6c7ac81c0d..e4101fa5388 100644 --- a/doc/markdown/markdown.md +++ b/doc/markdown/markdown.md @@ -28,6 +28,10 @@ * [Line Breaks](#line-breaks) * [Tables](#tables) +**[Wiki-Specific Markdown](wiki.md)** + +* [Links](wiki.md#links-to-other-wiki-pages) + **[References](#references)** ## GitLab Flavored Markdown (GFM) diff --git a/doc/markdown/wiki.md b/doc/markdown/wiki.md new file mode 100644 index 00000000000..b58107abea3 --- /dev/null +++ b/doc/markdown/wiki.md @@ -0,0 +1,77 @@ +# Wiki-Specific Markdown + +## Table of Contents + +* [Links to Other Wiki Pages](#links-to-other-wiki-pages) + * [Direct Page Link](#direct-page-link) + * [Direct File Link](#direct-file-link) + * [Hierarchical Link](#hierarchical-link) + * [Root Link](#root-link) + +## Links to Other Wiki Pages + +You can link to other pages on your wiki in a few different ways. + +### Direct Page Link + +A link which just includes the slug for a page will point to that page, _at the base level of the wiki_. + +1. This snippet would link to a `documentation` page at the root of your wiki. + +```markdown +[Link to Documentation](documentation) +``` + +### Direct File Link + +Links with a file extension point to that file, _relative to the current page_. + +1. If this snippet was placed on a page at `<your_wiki>/documentation/related`, it would link to `<your_wiki>/documentation/file.md`. + + ```markdown + [Link to File](file.md) + ``` + +### Hierarchical Link + +A link can be constructed relative to the current wiki page using `./<page>`, `../<page>`, etc. + +1. If this snippet was placed on a page at `<your_wiki>/documentation/main`, it would link to `<your_wiki>/documentation/related`. + + ```markdown + [Link to Related Page](./related) + ``` + +1. If this snippet was placed on a page at `<your_wiki>/documentation/related/content`, it would link to `<your_wiki>/documentation/main`. + + ```markdown + [Link to Related Page](../main) + ``` + +1. If this snippet was placed on a page at `<your_wiki>/documentation/main`, it would link to `<your_wiki>/documentation/related.md`. + + ```markdown + [Link to Related Page](./related.md) + ``` + +1. If this snippet was placed on a page at `<your_wiki>/documentation/related/content`, it would link to `<your_wiki>/documentation/main.md`. + + ```markdown + [Link to Related Page](../main.md) + ``` + +### Root Link + +A link starting with a `/` is relative to the wiki root, for non-file links. + +1. This snippet links to `<wiki_root>/documentation` + + ```markdown + [Link to Related Page](/documentation) + ``` + +1. This snippet links to `<wiki_root>/miscellaneous.md` + + ```markdown + [Link to Related Page](/miscellaneous.md) + ``` |