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

HTML anchors within pages not working? #13

Closed
peterjc opened this issue Apr 13, 2016 · 6 comments
Closed

HTML anchors within pages not working? #13

peterjc opened this issue Apr 13, 2016 · 6 comments

Comments

@peterjc
Copy link
Member

peterjc commented Apr 13, 2016

e.g. http://biopython.org/wiki/Documentation#Papers does not seem to scroll to the child section?

Edit: This link appears in http://biopython.org/wik/Publications aka https://github.com/biopython/biopython.github.io/blob/master/wiki/Publications.md from the original mediawiki text:

There is a separate shorter listing of [[Documentation#Papers|Biopython papers you may wish to cite]].
@MarkusPiotrowski
Copy link
Contributor

In the html-document (that goes online) the anchor is lower case: <h4 id="papers"...
So http://biopython.org/wiki/Documentation#papers does work.
Actually I wonder, where are the anchors in the markdown document? What's the magic behind this?

@peterjc
Copy link
Member Author

peterjc commented Apr 13, 2016

It looks like MediaWiki requires the final URL follows some canonical title case rules, and likely does this internally when rendering the original text into HTML:

https://www.mediawiki.org/wiki/Help:Links#Internal_links <-- works
https://www.mediawiki.org/wiki/Help:Links#Internal_Links <-- fails

My guess is the Jekyll/kramdown stack has its own rules for the case of the automatic anchor names, which differ, and we may need to tweak the links to match? More investigation is needed.

@MarkusPiotrowski
Copy link
Contributor

I have checked a few of them. Jekyll seem to make them all lower-case and hyphen instead of underscore, e.g. instead of

SeqIO#File_Formats

this is the correct link:

SeqIO#file-formats

However, this seems to be a minor problem, there are approx. 8 internal links with anchors in 4 pages.

@peterjc
Copy link
Member Author

peterjc commented May 2, 2016

OK, so we should just change the URLs to match the new anchors?

(We can't fix any external anchors, but at least such links will still go to the right page)

@MarkusPiotrowski
Copy link
Contributor

Yes, I'm working on it.

@peterjc
Copy link
Member Author

peterjc commented May 3, 2016

Closing this on the assumption pull request #68 resolved it, thanks Markus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants