I'm trying to generate EPubs from HTML files, and they contain a bunch of links to internal pages (the pages are on the same folder). When running pandoc to convert the files, it doesn't keep the links correctly. Looking on calibre, the EPub pages are something like "ch001.xhtml", but the links are kept with the html file name (eg: "Array.html"). Is there a way to correctly parse the links from HTML into the EPub? Or perhaps another CLI to convert these instead of pandoc?
Command I'm running:
pandoc --from html --toc -o 'docs/Ruby 2.7.0.epub' docs/ruby/2.7.0/**/*.html --metadata title="Ruby 2.7.0"
Thanks