Loopback-next: broken links for repository decorators page

Created on 8 Jul 2019  路  5Comments  路  Source: strongloop/loopback-next

Steps to reproduce

In repository decoratros page, almost all the links are not working!!

Current Behavior

Page Not Found
image

Expected Behavior

The pages should load normally...

2019Q3 Docs bug community-contribution

All 5 comments

@kerolloz thank you for reporting the issue. I am afraid I cannot find the links you are referring to, could you please post a screenshot of the page where you are clicking on the link, and also the URL where the link points to? Thanks :)

@bajtos
for example, in repository decorator page, belongsto-decorator section...

image

the link BelongsTo relation should point to https://loopback.io/doc/en/lb4/BelongsTo-relation instead of https://loopback.io/doc/en/lb4/BelongsTo-relation.md.

I fixed that here => https://github.com/strongloop/loopback-next/pull/3318 :tada:

It is a bit strange, because normally we reference other files with the .md and when the docs appear on loopback.io, it shows the .html file. See https://github.com/strongloop/loopback-next/blob/master/docs/site/Concepts.md as an example.
However, for this repository decorator page, it doesn't do the transformation.

@b-admike @bajtos , any ideas?

@b-admike, since you're looking at this issue, I'm assigning this to you. Thanks.

@kerolloz The reason we use .md for relative links is because we use a certain Jekyll plugin (see https://github.com/benbalter/jekyll-relative-links) for converting those links to the generated .html files after building the site. I think the problem here is that we've done some reshuffling of the doc files, and the relative links need to be updated accordingly. First, the Edit this page link for https://loopback.io/doc/en/lb4/Decorators_repository.html at the top right corner needs to link to https://github.com/strongloop/loopback-next/blob/master/docs/site/decorators/Decorators_repository.md instead of https://github.com/strongloop/loopback-next/blob/master/docs/site//Decorators_repository.md (thanks @dhmlau for the catch). Next, all the links in https://github.com/strongloop/loopback-next/blob/master/docs/site/decorators/Decorators_repository.md file should point to ../<relative_link> since the file itself has been moved to decorators sub directory. E.g., for BelongsTo relation the link should be [BelongsTo relation](../BelongsTo-relation.md) instead of [BelongsTo relation](BelongsTo-relation.md). Here are other links that need to be fixed on that page that I found with the same pattern:

  • Repositories
  • Define Models
  • Model
  • Repository#controller-configuration
  • BelongsTo relation
  • HasOne relation
  • HasMany relation
Was this page helpful?
0 / 5 - 0 ratings