Linking
The basic pattern of creating links is [Text to Display](Resource URL)
.
External URLs
To create links to external websites, simply put the entire URL as the Resource URL
.
For example, [The Open Group](https://www.opengroup.org)
creates a link to The Open Group.
Internal Wiki Pages
To link to other pages within the same wiki, use the "Page Slug".
The Page Slug replaces spaces with dashes, and includes a folder hierarchy separated by slashes.
For example, to link to a page name "Detailed Information" under the "Alpha Project" folder, use [Details](Alpha-Project/Detailed-Information)
.
Page links are always relative to the wiki root, unless the slug is preceeded with "./" or "../", which refers to the same folder as the current page or its parent, respectively.
Leading slashes are optional, but can increase clarity ([Other Section](/folderB/Other-Section)
).
It is often a good idea to a have a table of contents on the home page, which links to the other wiki pages (or to section-level pages that themselves have more detailed links). The right-side pane also contains the list of pages, organized by their parent folders. This can be suitable as the table of contents for small wikis, but gets tedious when documentation becomes large.
GitLab Projects
Since the wiki documentation generally references code, it is useful to be able to link to other parts of GitLab. It always works to use the External URL format, and include the full URL to the resource in GitLab, however there are some additional features that make it easy to reference different resources.
Main Project Pages
To link to a project, you can directly use the text namespace/project>
.
GitLab will detect this and replace it inline with a link, applying the same text to display.
For example, this project's page is located at examples/wiki>.
Alternatively, the main link format can be used to create a special display text.
For example, [Wiki Tutorial](Examples/Wiki>)
generates: Wiki Tutorial.
Commits
To reference commits, you can directly use the commit SHA (or abbreviated SHA). GitLab detects this and creates the corresponding link; for example, ec4aaf2f.
The main link format can also be used here for special display text.
For example, [Second Commit](ec4aaf2f)
generates: Second Commit
Issues
Issues can be directly referenced with a prefixed "#". For example, #1 refers the first issue.
Similarly, you can give an alternate text using the main link format; for example [First Post!](#1)
generates: First Post!.