Skip to content

HTML anchors within pages not working? #13

Closed

Description

@peterjc

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]].

Activity

  1. MarkusPiotrowski commented on Apr 13, 2016

    @MarkusPiotrowski
    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?

  2. peterjc commented on Apr 13, 2016

    @peterjc
    MemberAuthor

    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.

  3. MarkusPiotrowski commented on May 2, 2016

    @MarkusPiotrowski
    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.

  4. peterjc commented on May 2, 2016

    @peterjc
    MemberAuthor

    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)

  5. MarkusPiotrowski commented on May 3, 2016

    @MarkusPiotrowski
    Contributor

    Yes, I'm working on it.

  6. peterjc commented on May 3, 2016

    @peterjc
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions