28

I want link wiki-page to issue text.

[]() syntax links into issues pool.

[[text|page]] doesn't work.

How to do it?

adnako
  • 1,287
  • 2
  • 20
  • 30

2 Answers2

59

You can also use relative paths. Here's an example from one of my projects:

[Using-a-Shell-Configuration-File](../wikis/Using-a-Shell-Configuration-File)

I prefer this approach to full paths, since it's not impossible that you might rename a project or transfer ownership to someone else, and so break any absolute references to parts of the repo.

Mahdi Bashirpour
  • 17,147
  • 12
  • 117
  • 144
Mark Birbeck
  • 2,813
  • 2
  • 25
  • 12
  • or even rename the domain your gitlab instance is hosted under! (just happened to me) – Brian Vanderbusch Aug 20 '14 at 13:31
  • 4
    Just for future reference, if you're using gitlab and want to link from an issue to a wiki page, I had to come back two directories instead of one like this `[your text here](../../wikis/your-slug-here)` – dguay Sep 09 '15 at 20:39
  • Thanks Mark! I guess, it should be the preferred way mentioned in the docs (unless someone has some very special requirements). – Jacek Apr 15 '16 at 15:28
  • Yes! That's what I was searching for in their docs and couldn't find any relative path reference. This part is not very well explained there – Zionsof Dec 28 '17 at 12:53
  • By doing this, you introduce a dependency on your codebase to more implementation decisions on the part of gitlab that you don't have control over. Any changes in path structure of the wiki AND the code project break your links, while use full paths only breaks when the wiki path structure changes. While I would like to have some dedicated syntax for links to wiki entries, I consider having to use full paths a smaller nuisance since you can easily change all paths in the wiki using your IDE since it's a git repository on its own... – bert bruynooghe Oct 27 '22 at 07:06
17

Use [text](link_to_wiki_page) where link_to_wiki_page is the full URL of the wiki page you want to link to. Just navigate to the page and copy/paste the URL from the URL bar.

Ivan Zuzak
  • 18,068
  • 3
  • 69
  • 61