In the current version of the script you must use the syntax file:///path/to/file when referencing a local file. This works but can be difficult to work with when you simply want to build a pdf for a file in the current directory. You can do something like file://$(realpath index.html) but that is not cross platform and doesn't work in environments like Git Bash for Windows.
This change utilizes the file-url package to automatically convert local file paths to a file url. It will only do so when the provided url does not start with http, https, or file.
In the current version of the script you must use the syntax
file:///path/to/file
when referencing a local file. This works but can be difficult to work with when you simply want to build a pdf for a file in the current directory. You can do something likefile://$(realpath index.html)
but that is not cross platform and doesn't work in environments like Git Bash for Windows.This change utilizes the file-url package to automatically convert local file paths to a file url. It will only do so when the provided url does not start with
http
,https
, orfile
.