'Set root path for relative links while converting with Pandoc

I have a markdown file which I want to convert into html file using pandoc.

It has some relative links in the form [text](relative_path.MD)

After conversion I want this links to lead to https://github.com/username/project/blob/master/relative_path.MD

In other words I want to set https://github.com/username/project/blob/master/ as a root for relative paths. Can I do this in some simple way?

I found that I can write arbitrary Lua filters, but surely I am not the first person trying to achieve this and there is some built-in method allowing to do this without writing own link parsing code?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source