Images in markup files in GitHub Enterprise

I am working on a README.md file in the GitHub Enterprise repository.

This is ridiculous, I use the same piece of code that I use in my public repositories, i.e.

![alt text](https://raw.github.com/repository/project/master/filename.png) 

Unfortunately, such a team does not work in a corporate project.

I see one big difference in the original version of the image. In particular, in the enterprise repository, I have the URL of the raw image file with the request parameter, for example.

 ?token=AAABGqiVI6Qk6Mi4ZM0ZBeHrXexkUBmNks5W_AyCwA%3D%3D 

Does anyone know how to incorporate a picture into markdowns at GutHub?

+5
source share
1 answer

Have you tried using relative links to your images? So trying to do something like ![](img/image_name.png) ? The reason I recommend this is because if they work with your repo, they should have these images independently, and if they access this online, GitHub will handle the rendering properly. This assumes that you want this information to be addressed to others in order to see it.

In fact, GitHub recommends not using absolute links such as [Absolute README link](https://github.com/username/repo/blob/branch/docs/more_words.md) Source

Change I also found this SO question / answer , which may be useful for a reference to how to solve it. He also mentions relative binding:

GitHub recommends using relative links with the ?raw=true parameter to ensure the correct forped repos position.

It also talks about how you can have a separate branch that can contain all your screenshots, and you can refer to them as ![Alt text](/../<branch name>/path/to/image.png?raw=true "Optional Title")

Hope this helps!

+2
source

Source: https://habr.com/ru/post/1245711/


All Articles