0

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?

reducing activity
  • 1,985
  • 2
  • 36
  • 64

1 Answers1

0

Just came across this filter:

https://musteresel.github.io/posts/2018/01/pandoc-project-relative-links.html

It's in Haskell rather than Lua so won't be as efficient as a lua filter.

No idea if it works!

s6mike
  • 497
  • 5
  • 16