Add resolveRefs transform

Provide a transformation function that maps absolute references to
resources into relative references based on the location of a page.
This makes it possible to use the same links across multiple pages
in the hierarchy that works when loaded as files from the filesystem.
This commit is contained in:
Hornwitser 2025-01-22 08:58:48 +01:00
parent 7aa937a7e9
commit 17f8693eae
4 changed files with 105 additions and 2 deletions

View file

@ -7,7 +7,7 @@
"scripts": {
"prepare": "tsc",
"build": "node --enable-source-maps build/node/cli.js",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "node --test --enable-source-maps --experimental-test-coverage"
},
"dependencies": {
"antihtml": "^0.3.0"