From 4611191785f2ca0eca2ba5be3b24224879bc5c50 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 2 Aug 2016 13:34:49 +0300 Subject: Merge wiki-specific Markdown in main Markdown file --- doc/markdown/markdown.md | 82 +++++++++++++++++++++++++++++++++++++++++++-- doc/markdown/wiki.md | 87 ------------------------------------------------ 2 files changed, 80 insertions(+), 89 deletions(-) delete mode 100644 doc/markdown/wiki.md diff --git a/doc/markdown/markdown.md b/doc/markdown/markdown.md index e4101fa5388..d7f09ec070c 100644 --- a/doc/markdown/markdown.md +++ b/doc/markdown/markdown.md @@ -28,9 +28,12 @@ * [Line Breaks](#line-breaks) * [Tables](#tables) -**[Wiki-Specific Markdown](wiki.md)** +**[Wiki-Specific Markdown](#wiki-specific-markdown)** -* [Links](wiki.md#links-to-other-wiki-pages) +* [Wiki - Direct page link](#wiki-direct-page-link) +* [Wiki - Direct file link](#wiki-direct-file-link) +* [Wiki - Hierarchical link](#wiki-hierarchical-link) +* [Wiki - Root link](#wiki-root-link) **[References](#references)** @@ -696,6 +699,81 @@ By including colons in the header row, you can align the text within that column | Cell 1 | Cell 2 | Cell 3 | Cell 4 | Cell 5 | Cell 6 | | Cell 7 | Cell 8 | Cell 9 | Cell 10 | Cell 11 | Cell 12 | + +## Wiki-specific Markdown + +The following examples show how links inside wikis behave. + +### Wiki - 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_. + +This snippet would link to a `documentation` page at the root of your wiki: + +```markdown +[Link to Documentation](documentation) +``` + +### Wiki - Direct file link + +Links with a file extension point to that file, _relative to the current page_. + +If this snippet was placed on a page at `/documentation/related`, +it would link to `/documentation/file.md`: + +```markdown +[Link to File](file.md) +``` + +### Wiki - Hierarchical link + +A link can be constructed relative to the current wiki page using `./`, +`../`, etc. + +- If this snippet was placed on a page at `/documentation/main`, + it would link to `/documentation/related`: + + ```markdown + [Link to Related Page](./related) + ``` + +- If this snippet was placed on a page at `/documentation/related/content`, + it would link to `/documentation/main`: + + ```markdown + [Link to Related Page](../main) + ``` + +- If this snippet was placed on a page at `/documentation/main`, + it would link to `/documentation/related.md`: + + ```markdown + [Link to Related Page](./related.md) + ``` + +- If this snippet was placed on a page at `/documentation/related/content`, + it would link to `/documentation/main.md`: + + ```markdown + [Link to Related Page](../main.md) + ``` + +### Wiki - Root link + +A link starting with a `/` is relative to the wiki root. + +- This snippet links to `/documentation`: + + ```markdown + [Link to Related Page](/documentation) + ``` + +- This snippet links to `/miscellaneous.md`: + + ```markdown + [Link to Related Page](/miscellaneous.md) + ``` ## References - This document leveraged heavily from the [Markdown-Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet). diff --git a/doc/markdown/wiki.md b/doc/markdown/wiki.md deleted file mode 100644 index d9e6d071b9f..00000000000 --- a/doc/markdown/wiki.md +++ /dev/null @@ -1,87 +0,0 @@ -# Wiki-specific Markdown - -This page has information related to wiki-specific Markdown. For more -information on GitLab's Markdown, see the [main Markdown document](./markdown.md). - -## 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_. - -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_. - -If this snippet was placed on a page at `/documentation/related`, -it would link to `/documentation/file.md`: - -```markdown -[Link to File](file.md) -``` - -### Hierarchical link - -A link can be constructed relative to the current wiki page using `./`, -`../`, etc. - -- If this snippet was placed on a page at `/documentation/main`, - it would link to `/documentation/related`: - - ```markdown - [Link to Related Page](./related) - ``` - -- If this snippet was placed on a page at `/documentation/related/content`, - it would link to `/documentation/main`: - - ```markdown - [Link to Related Page](../main) - ``` - -- If this snippet was placed on a page at `/documentation/main`, - it would link to `/documentation/related.md`: - - ```markdown - [Link to Related Page](./related.md) - ``` - -- If this snippet was placed on a page at `/documentation/related/content`, - it would link to `/documentation/main.md`: - - ```markdown - [Link to Related Page](../main.md) - ``` - -### Root link - -A link starting with a `/` is relative to the wiki root. - -- This snippet links to `/documentation`: - - ```markdown - [Link to Related Page](/documentation) - ``` - -- This snippet links to `/miscellaneous.md`: - - ```markdown - [Link to Related Page](/miscellaneous.md) - ``` -- cgit v1.2.1