Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirects for Docs #156

Closed
wants to merge 1 commit into from

Conversation

SergioCrisostomo
Copy link
Member

The idea is to redirect these type of links:

  • core/Module/File
  • core/docs/Module/File

The idea with this part under is to allow links from "popular pages" in the docs index to be linked to that popular page in the version they were clicked, thus req.headers.referer

var reqVersion = req.headers.referer && req.headers.referer.match(/(\d.\d.\d)/);
var version = reqVersion ? reqVersion[1] : versions[0];

@arian
Copy link
Member

arian commented Nov 5, 2014

I think it's probably better to build the docs with the right URLs than all that redirecting.

@SergioCrisostomo
Copy link
Member Author

@arian we have had in the past both docs/core/Molude/File and just core/Module/File.
Now we would have version-wise: core/docs/version/Module/File

Do you mean we should go back to one of the older way? The good thing with the new system is that core/Swift will have the version in it and not break like old method where core/Swift is a broken link since 1.5

@arian
Copy link
Member

arian commented Nov 5, 2014

No, I mean build/docs could fix the links.

@arian
Copy link
Member

arian commented Nov 5, 2014

See #162

@SergioCrisostomo
Copy link
Member Author

@arian updated.

It fixes the above cases, plus internal links fixed thru docs compiler.

@timwienk timwienk changed the title Redirects Redirects for Docs Nov 6, 2014
@timwienk
Copy link
Member

timwienk commented Nov 6, 2014

The old links were /docs/:module/:file, not /core/:module/:file. Little mistake there, I think.

@SergioCrisostomo
Copy link
Member Author

@timwienk there are also cases of /core/module/file, internal links in the Docs like the links in popular pages here: http://mootools.net/core/docs/1.5.1

@timwienk
Copy link
Member

timwienk commented Nov 7, 2014

Those did not exist like that in the past, the popular pages linked to pages within /docs. In fact they can't have existed, since there was /core/:hash for the builder.

See google's cache.

@SergioCrisostomo
Copy link
Member Author

@timwienk good point. Corrected and updated.

@SergioCrisostomo
Copy link
Member Author

afaik this is ready... comments welcome.

@arian arian modified the milestone: 1.1 Nov 11, 2014
@SergioCrisostomo
Copy link
Member Author

Would be nice to have this merged and uploaded. Anything missing from my part?

@arian arian closed this in 91cc6e8 Nov 14, 2014
@SergioCrisostomo SergioCrisostomo deleted the redirects branch November 14, 2014 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants