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?
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:
You can even embed pictures hosted in the repository by putting "raw" in the url when using the
![]()
syntax:If you use the Creole syntax instead of markdown, there is even an easier way.