relative link in README of monorepo

(Klaus Meinhardt) #1

What I Wanted to Do

When publishing @fimbul/mimir which is located in my monorepo in in subdirectory packages/mimir, I expect all relative links in to be resolved relative to

What Happened Instead

Relative links are resolved relative to the repository root, so becomes

Reproduction Steps

git clone
cd wotan
cd packages/mimir
npm publish


If I changed the repository URL in package.json to something like it still wouldn’t work. In that case marky-markdown would generate

Maybe the logic for resolving relative links could take into account if /blob/<branch>/ is already present in the repo URL

Platform Info

$ npm --versions
$ node -p process.platform
Ubuntu 14.04.5 LTS