Skip to content

Navigation links are broken in "Tour of Scala" at http://docs.scala-lang.org #977

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

Closed
elpinal opened this issue Jan 10, 2018 · 9 comments
Closed

Comments

@elpinal
Copy link

elpinal commented Jan 10, 2018

The bottom links, "next →" and "← previous", of each page of "Tour of Scala" are broken since those URLs are not given the suffix ".html".
For example, http://docs.scala-lang.org/tour/basics.html is accessible, but http://docs.scala-lang.org/tour/basics, which is "next →" in http://docs.scala-lang.org/tour/tour-of-scala.html indicates, responds with "404 Not Found error".

Note that running bundle exec jekyll serve -I in local works correctly.

@Madusudanan
Copy link
Contributor

Madusudanan commented Jan 10, 2018

This issue seems to be sitewide. The below URLs also do not work without the .html extension for example.

http://docs.scala-lang.org/sips/all

http://docs.scala-lang.org/overviews/core/architecture-of-scala-collections

I guess it has to do with the permalink, I think adding the below line to _config.yml

# Permalinks
permalink:        pretty

should fix it - https://jekyllrb.com/docs/permalinks/#permalink-style-examples. And it should work both ways i.e with and without the .html extension.

But this is tricky to test as it works in local by default.

@elpinal
Copy link
Author

elpinal commented Jan 10, 2018

It is important to use URLs in a consistent format. I'd suggest that use just .html URLs and fix all links which lack .html extensions and point wrong paths.

A naive way may solve it: adding | append: '.html' to {{page.previous-page}} and {{page.next-page}} in _layouts/tour.html. If using .html eternally, I think it's enough.

@Madusudanan
Copy link
Contributor

I agree on consistent URL format but I disagree on the .html for all pages. It doesn't look clean and can lead to errors (IMHO). We can have jekyll to handle both, i.e with and without html automatically, but without the .html as the default and only use clean URLs . Maybe the community can take a call on the naming convention.

@elpinal
Copy link
Author

elpinal commented Jan 10, 2018

I disagree on the .html for all pages

  1. I didn't mean .html for all pages. And I didn't suggest the change of permalinks.
  2. I'd prefer URLs without .html to with .html (FYI).
  3. All I request is fix the bottom links, "previous" and "next", in "Tour of Scala" at http://docs.scala-lang.org.

We can have jekyll to handle both

I disagree with allowing both formats, i.e. with and without .html. A mixture of many formats makes visitors confusing.

I apologize for the obscure explanation.

@Madusudanan
Copy link
Contributor

Madusudanan commented Jan 10, 2018

I disagree with allowing both formats, i.e. with and without .html. A mixture of these formats makes visitors confusing.

Well, this is mainly for backporting. There are many links out there which could still point out to the .html version, so this might be useful. There are less chances for confusion as we have standard naming across docs website and externals links will eventually point to the non .html version over time.

All I request is fix the bottom links, "previous" and "next", in "Tour of Scala" of https://www.scala-lang.org.

If we have a standard convention it should fix the Tour of Scala section as well along with others.

I apologize for the obscure explanation

No issues. Glad that we are on the same page.

@elpinal elpinal changed the title Broken links in "Tour of Scala" Navigation links are broken in "Tour of Scala" at http://docs.scala-lang.org Jan 10, 2018
@prashant7090
Copy link

http://docs.scala-lang.org/tour/basics giving 404.
broken

@SethTisue
Copy link
Member

Now that #947 is merged, this issue is caught automatically during PR validation; see e.g. https://platform-ci.scala-lang.org/scala/docs.scala-lang/239. But a fix is still needed

SethTisue added a commit that referenced this issue Jan 10, 2018
fix broken tour navigation links (issue #977)
@SethTisue
Copy link
Member

A naive way may solve it: adding | append: '.html' to {{page.previous-page}} and {{page.next-page}} in _layouts/tour.html. If using .html eternally, I think it's enough

I went ahead and did that in #983, since the broader issues here are unclear to me.

@wmonk
Copy link
Contributor

wmonk commented Jan 11, 2018

Apologies, as @elpinal mentioned this works fine locally!

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

No branches or pull requests

5 participants