Carbon: Wrong links in API Documentation sections in README files

Created on 30 Oct 2020  路  4Comments  路  Source: carbon-design-system/carbon

The API Documentation section in some packages READMEs has wrong links.

For example, the @carbon/layout package has this link which doesn't exist in the repo. It has an extra path at the end blob/HEAD/docs/sass.md
image

Same thing for:

There might be other packages with the same issue but those are the ones I checked.

bug 馃悰 docs 馃摉

All 4 comments

this seems to be an issue with how npm resolves relative links in READMEs. we already have defined the repository field in our package.json files according to this thread from a couple years ago https://npm.community/t/relative-links-in-npm-readme-markdown-not-functional/1525

@emyarod any action we can take then?

I thought about hard coding the links but it may be better to raise this issue against npm instead, since most if not all of our documentation links use relative paths which not only work on GitHub but also in editors like VS Code

not sure if this is the reason but https://github.com/carbon-design-system/carbon/tree/master/packages/layout in https://github.com/carbon-design-system/carbon/blob/master/packages/layout/package.json might technically not be a repository but a directory within one ... could try use use the directory property instead? https://docs.npmjs.com/cli/v6/configuring-npm/package-json#repository

Was this page helpful?
0 / 5 - 0 ratings