Skip to content

Redirects for Docs - #156

Closed
SergioCrisostomo wants to merge 1 commit into
mootools:masterfrom
SergioCrisostomo:redirects
Closed

SergioCrisostomo wants to merge 1 commit into
mootools:masterfrom
SergioCrisostomo:redirects

Conversation

@SergioCrisostomo

Copy link
Copy Markdown
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

arian commented Nov 5, 2014

Copy link
Copy Markdown
Member

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

@SergioCrisostomo

Copy link
Copy Markdown
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

arian commented Nov 5, 2014

Copy link
Copy Markdown
Member

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

@arian

arian commented Nov 5, 2014

Copy link
Copy Markdown
Member

See #162

@SergioCrisostomo

Copy link
Copy Markdown
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

timwienk commented Nov 6, 2014

Copy link
Copy Markdown
Member

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

@SergioCrisostomo

Copy link
Copy Markdown
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

timwienk commented Nov 7, 2014

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

@timwienk good point. Corrected and updated.

@SergioCrisostomo

Copy link
Copy Markdown
Member Author

afaik this is ready... comments welcome.

@arian arian modified the milestone: 1.1 Nov 11, 2014
@SergioCrisostomo

Copy link
Copy Markdown
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