Search code examples
githubgithub-flavored-markdown

github: how to add links to sections of readme.md


I have a github project and want to add links to the readme referring to sections on that readme. I tried several ways, one typical markdown, the other html based with anchor. Whereas everything works well in my local browser, on github clicking at the links to not move to the proper position.

Is this maybe a bug in github??

For a concrete example

https://github.com/Reissner/latex-maven-plugin

Solution

  • I've seen your markdown like:

    in [Section 'Features'](#ssFeatures) 
    
    ## Features <a id='ssFeatures'></a>
    

    Your can try to use the following method:

    in [Section `Features`](#feature)
    
    ## Feature
    

    The "[Section 'Feature']" will be a link to "#Feature"

    In addition, you can follow this README which have a lot of "link to section".

    If I have answered your question to your satisfaction, then consider accepting the answer.