Q:

BitBucket: how to track a repo's branches in its Wiki repo?

I have a (Mercurial) repo on BitBucket where I have a documentation directory to keep some simple markdown files
project
    .hg
    .hgignore
    src
        many files
    doc
        Home.md

This setup allows me to develop my documentation in sync with my code. I can write a small page documentating a new feature on a feature branch, and then merge both the source and the documentation into the master branch with a single commit. 
However, the BitBucket wiki is a separate repository by itself (and I believe it's the same for GitHub). I can't figure out how to point it to my documentation. What works is to rename doc to wiki and make it a sub-repo inside project, but then it loses the branches from the main repo.
So my question is: Is there any way I can let my wiki track the doc subdirectory (with all its branches) from my main repository? Does Git or GitHub make it any easier? 

A:

There does not seem to be a way to track the wiki directory inside the project directory. But you can link to files in the project repository from the wiki. Example:
[README from default](https://bitbucket.org/owner/repository/src/tip/README.md)
[README from feat-aa](https://bitbucket.org/owner/repository/src/aa/README.md)
[Some other file](https://bitbucket.org/owner/repository/src/tip/doc/SOMEFILE.md)

You can even embed pictures hosted in the repository by putting "raw" in the url when using the ![]() syntax:
![A image](https://bitbucket.org/owner/repository/raw/tip/image.png)

If you use the Creole syntax instead of markdown, there is even an easier way.

