strongloop / loopback

LoopBack makes it easy to build modern applications that require complex integrations.
http://loopback.io
Other
13.23k stars 1.2k forks source link

Broken link in documentation #2117

Closed socketwiz closed 8 years ago

socketwiz commented 8 years ago

If you cannot determine which project to report the issue to, post the issue in the LoopBack repository itself.

I found some broken links in the documentation and I'm not sure where else to report it:

https://docs.strongloop.com/display/public/LB/Tutorial%3A+model+relations

Create six boot scripts: sample-customers.js z-book-people.js z-customer-accounts.js z-customer-address.js z-customer-emails.js

I think the samples they should link to have been moved here: https://github.com/strongloop/loopback-example-relations/tree/master/server/boot

superkhau commented 8 years ago

@crandmck ^

crandmck commented 8 years ago

@superkhau This is due to using relative links in the README, which is the source for that page.

OK if I change the links to absolute? The alternative would be to leave the links as-is in the README and write a little script to fix them on the client at view-time. It's a bit more work, but I could do it.

superkhau commented 8 years ago

@crandmck Yes, please change the links to absolute anytime you deem necessary. I'm interested in your idea about the script though. We can prob discuss this on Slack. I want to find a way to allow us to write relative links in README's while allowing you to have full links for confluence.

crandmck commented 8 years ago

We can discuss if you like, but it would just a be a JQuery script that looks for relative links, e.g.

<a href="/server/views/index.ejs"><code>index.ejs</code> in the views directory</a>

And then just prepends https://github.com/strongloop/loopback-example-relations/blob/master on those URLs so they resolve properly; so in this example, the URL would be https://github.com/strongloop/loopback-example-relations/blob/master/server/views/index.ejs instead of https://docs.strongloop.com/server/views/index.ejs, which is how Confluence interprets these relative URLs. I think this algorithm will fix all the links, but I'd want to confirm there are no other cases to handle.

The script can be injected via the custom Confluence macro being used on that page, and the repo name can be a parameter.

It's not rocket science, but I just need to find time to do it. As you know, it's rather busy on other fronts atm.

superkhau commented 8 years ago

@crandmck :+1: Good solution and yes I agree with being busy on other fronts ATM. Feel free to change the links to absolute for the time being until you get time to implement the proposed solution. We can just change them back to relative then.

crandmck commented 8 years ago

OK, canged links to absolute temporarily with https://github.com/strongloop/loopback-example-relations/commit/2c5181f4a412c21b415bd5f1cba2880b5a9fe5b9.