dojo.io icon indicating copy to clipboard operation
dojo.io copied to clipboard

Need stable link to latest docs

Open smhigley opened this issue 7 years ago • 6 comments

Widget READMEs need to link to their API docs, but linking to a specific version would be difficult to maintain. Could we add something like /latest/?

smhigley avatar May 30 '17 15:05 smhigley

We should create a forwarding mechanism using meta refresh tag when a user goes to /api/<package>. The forwarding page can be built at the same time index.html is since it already updates links to the latest APIs. We can also copy the latest api directory into /api/<package>/latest if that makes linking (i.e. query params) easier.

devpaul avatar Sep 14 '17 15:09 devpaul

Or we can have rewrite rules on for the webserver... I am not sure what actual server is being used for dojo.io, but some form of rewrite rules should be available.

kitsonk avatar Sep 14 '17 15:09 kitsonk

GitHub doesn't have rewrite rules (or symlinks). Server tricks are out unless we switch to a real server.

devpaul avatar Sep 14 '17 15:09 devpaul

There is jekyll-redirect-from.

kitsonk avatar Sep 14 '17 16:09 kitsonk

jekyll-redirect-from creates html with a meta tag. We used to disable jekyll w/ a .nojekyll file because hexo is our templater. Not sure if we do any more. Even so, if the choice is between adding another system to our build pipeline (jekyll) vs adding some code to our build I would vote for the latter.

This is the entry point for making /api/index.html: https://github.com/dojo/dojo.io/blob/master/support/grunt/tasks/hexo.ts#L18

devpaul avatar Sep 14 '17 19:09 devpaul

There is this plugin for hexo that does essentially what the jekyll one does.

kitsonk avatar Sep 15 '17 07:09 kitsonk