Financial-Times / origami-registry-ui

Get information about Origami components, services, and repositories.
https://registry.origami.ft.com/
15 stars 3 forks source link

fix links within the readme of non-components (e.g. libraries such as o-errors) #636

Open notlee opened 1 year ago

notlee commented 1 year ago

Links within the readme of non-component's may be broken. The registry replaces any relative links within a readme to source code / files with an absolute link to Github. To do so the registry assumes understanding of the financial-times/origami repository's directory structure – and gets that wrong for non-components.

It assumes all projects live under the components directory within the mono repo. Some projects such as tools live under the tools directory. Other projects such as libraries live under the libraries directory. https://github.com/Financial-Times/origami/tree/${component.name}-v${component.version}/components/${component.name}. https://github.com/Financial-Times/origami-registry-ui/blob/master/lib/code-docs/readme/index.js#L20

E.g. the migration guide links in the o-errors readme link to: https://github.com/Financial-Times/origami/tree/o-errors-v5.2.2/components/o-errors/MIGRATION.md#migrating-from-v4-to-v5 instead of: https://github.com/Financial-Times/origami/tree/o-errors-v5.2.2/libraries/o-errors/MIGRATION.md#migrating-from-v4-to-v5 Screenshot 2022-11-15 at 14 21 43