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

Package documentation URL not compatible with hoogle/old hackage #61

Closed
bennofs opened this issue Sep 14, 2013 · 6 comments
Closed

Package documentation URL not compatible with hoogle/old hackage #61

bennofs opened this issue Sep 14, 2013 · 6 comments

Comments

@bennofs
Copy link
Contributor

bennofs commented Sep 14, 2013

Currently, hoogle generates URLs like the following:

http://hackage.haskell.org/package/HUnit/docs/Test-HUnit-Base.html#v:test

This is no longer a valid URL with hackage2. Should the documentation URLs be compatible with old hackage?

@aslatter
Copy link
Contributor

It looks like we have a redirect in place from http://beta.hackage.haskell.org/packages/archive/QuickCheck/latest/doc/html/Test-QuickCheck-Test.html#v:test to http://beta.hackage.haskell.org/package/QuickCheck/docs/Test-QuickCheck-Test.html#v:test except that the second URL doesn't work.

The following link does work, however: http://beta.hackage.haskell.org/package/QuickCheck-2.6/docs/Test-QuickCheck-Test.html .

I think we used to be able to get from the "docs with no version" path to the "most recent version of docs", but that must have disappeared at some point.

@dcoutts
Copy link
Contributor

dcoutts commented Sep 19, 2013

BTW, to avoid other people being confused, hoogle actually points to:

http://hackage.haskell.org/packages/archive/HUnit/latest/doc/html/Test-HUnit-Base.html#v:test

@aslatter Right, we could add in a redirect from the unversioned link. Notice that we actually do have a redirect from http://beta.hackage.haskell.org/package/QuickCheck/docs/ but it goes into an infinte redirect loop...

So looks like all we have to do is fix that and while we're at it make things below that redirect too, and we're sorted.

@dcoutts
Copy link
Contributor

dcoutts commented Sep 19, 2013

BTW, a related problem is that search engines etc always index a specific version of the docs and then in practice that means users going via google get sent to an older version of the docs than necessary. It'd be nice if we could think of some way to encourage search engines to give people the unversioned links.

@aslatter
Copy link
Contributor

It looks like we can specify a canonical URL in HTTP headers:
https://support.google.com/webmasters/answer/139394?hl=en

That we would only do this for the most-recent set of haddocks.

dcoutts added a commit that referenced this issue Sep 19, 2013
That is /package/foo/docs/blah.html -> /package/foo-1.0/docs/blah.html
Using a temp redirect to whatever is the latest version.
Fixes issue #61
@dcoutts
Copy link
Contributor

dcoutts commented Sep 19, 2013

@aslatter yes I'm aware of the rel=canonical thing, but it's not clear to me that it would help us here. We would have to use canonical to point to a url that does a temporary redirect. I fear the google indexer would not like us.

@dcoutts
Copy link
Contributor

dcoutts commented Sep 19, 2013

Fixed and code running on the sever.

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

3 participants