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

Docs redirects #5824

Merged
merged 11 commits into from
Oct 5, 2017
Merged

Docs redirects #5824

merged 11 commits into from
Oct 5, 2017

Conversation

cherniavskii
Copy link
Collaborator

@cherniavskii cherniavskii commented Oct 5, 2017

In #5493 jekyll-redirect-from was added for redirects, and it works.

But there are links to docs with hash params in examples, which are all redirected to http://leafletjs.com/reference-1.2.0.html instead of http://leafletjs.com/reference-1.2.0.html#hash.
See L.Icon link in Custom Icons example.

Since jekyll-redirect-from does not preserve hash params, I removed it and used redirected.html layout, which I modified to preserve hash params.

I also fixed some absolute links, and changed some links from specific docs version to latest.

So now it is possible to refer latest docs with hash like that:

[LatLng](/reference.html#latlng)

and it will redirect to docs version defined in main reference.html file.

Tested locally, it should work.

Copy link
Member

@IvanSanchez IvanSanchez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@perliedman
Copy link
Member

Nice, should close #5508 if I understand correctly!

@cherniavskii cherniavskii added the docs Improvements or additions to documentation label Oct 5, 2017
@cherniavskii cherniavskii merged commit 748905c into master Oct 5, 2017
@cherniavskii cherniavskii deleted the docs-redirects branch October 5, 2017 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants