I am trying to integrate various Markdown files that I have prepared offline into my BitBucket wiki. I have successfully committed the files via Git and I can open them within the BitBucket website, but somehow, I fail to link to them. I know it should be obvious, but I haven't yet found out how to do it, and the documentation doesn't appear to describe inter-page linking.
For instance, within the wiki root directory, I have a subdirectory `a` with a file `b.md`.
I can open `https://bitbucket.org/<group>/<project>/wiki/a/b` and successfully arrive at the content of the aforementioned `b.md`.
However, if I add a link like `[b](a/b)` to one of my existing wiki pages, that link will not work (when trying from within the page preview). The resulting page will claim:
> Hmm... can't find that one
I went through and tested this to ensure linking to internal pages works as expected. Using the following will only attempt to find the page/file within the same directory and it will not reach out to the child directory (even though you referenced it)
If you’re wanting to reference a page that is a child under another page, you will need to use the full URL within the link, such as:
There was a bug reported for this similar issue, but the response back was this is how it is supposed to function and the bug request was closed. You may find that request at Issue #9014.
The solution for this seems to be to link the full URL to pages that are a child of another page.
I hope this information proves helpful in resolving your linkage issues within Bitbuckets wiki.
I do not consider linking to the full URL a valid solution - as soon as the base URL of the wiki changes (project rename, clone/branch, or already when displaying the wiki pages locally from the working copy), the links will be broken (because they point back to the original wiki location rather than the place where the entry page is currently displayed from). So, in short, Bitbucket's wiki doesn't support subfolders.
That is quite unfortunate in terms of structuring large wikis, as a checked out local working copy of a wiki Git repository will end up a huge folder with countless files.
Good to know of course, so I'll accept this answer.
Linking to child pages can be done directly:
Will correctly link to: https://bitbucket.org/workspace/repo/wiki/folder/file2
The accepted answer is still valid: there is no real support for linking to pages that have a different parent.
However, playing with relative URLs does seem to work (at least sometimes):
# File 1
Will correctly link to: https://bitbucket.org/workspace/repo/wiki/other_folder/file2
If you only use a single parent directory symbol (../), the resulting URL will be /src/other_folder/file2. (This is how you can link to files from e.g. your README.md.)
Warning: use such linking at your own risk. This feels more like something that accidentally works than a real feature.
Tip: the preview feature on a wiki editing page seems to resolve link URLs the same way as the real wiki renderer, use that to test your links.
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events