Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

⭐ Calling all Bitbucket and DevOps experts: Special showcase opportunity ⭐

Hi, Bitbucket community! Are you a DevOps practitioner (or know one in your network)? Do you have DevOps tips, tricks, or learnings you'd like to share with the community? If so, we'd love to hea...

1,517 views 4 8
Read article

Community Events

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

Events near you