Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,360,197
Community Members
 
Community Events
168
Community Groups

Re: How to reference other .md files in README.md

Edited

Hi guys,

Relating to to this post:

I'm not sure if i am in the right place, but I'll have a try:

We use a server version of Bitbucket (currently 5.16) in our company and have project with 15+ repositories.

Now from the documentation (MARKDOWN) of one repo (e.g. from the main README.md) I want to link to information in another repo.

Say we have

MyProject
|-repo1
| |-README.md
| `-other_stuff
|
`-repo2
|-docs
| |-index.md
| `-setup.md
`-other_stuff

So I want to create a link in repo1/README.md to repo2/docs/setup.md.

 

Locally (e.g. when viewing the markdown in my IDE or browser), it is as simple as

See [here](../repo2/docs/setup.md) for setup.

But when I use the docs in the Bitbucket Web UI, the links don't work and lead to a "404 dead link" page.

I figure that the reason is the "virtual" /browse folder that bitbucket creates.

When viewing the Readme, I have the url

https://our.bitbucket.server/projects/MyProject/repos/repo1/browse/README.md

, so ../repo2/docs/setup.md leads to

... /repo1/repo2/docs/setup.md

 

I'm wondering if this can be mitigated somehow. So far I just created two links, one that works locally (in the "normal" file structure and one that works on bitbucket with the extra "directories":

See [here](../repo2/docs/setup.md) for setup (or [here](../../repo2/browse/docs/setup.md) if you are on Bitbucket.

 But this is kind of ugly and possibly confusing to others.

 

I read some tickets here, but all of them seem to be closed and don't say for which version and also don't really mention the /browse problem... Like:

https://bitbucket.org/site/master/issues/6315

https://bitbucket.org/site/master/issues/7504/

https://bitbucket.org/site/master/issues/15949/

Especially the last one seems to relate to this problem. So, I wonder how (or where) this was fixed and hope I get some helpful information here.

 

Thank you! :-)

1 answer

0 votes
Pramodh M Community Leader Dec 16, 2021

Hi @Chris M_

 

Include directive is supported.

 

Thanks,
Pramodh

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

3,470 views 3 10
Read article

Atlassian Community Events