How to link to part of the same document in Markdown?

前端 未结 14 1680
眼角桃花
眼角桃花 2020-11-29 14:50

I am writing a large Markdown document and would like to place a table of contents of sorts at the beginning that will provide links to various locations in the document. Ho

14条回答
  •  抹茶落季
    2020-11-29 15:04

    This may be out-of-date thread but to create inner document links in markdown in Github use...
    (NOTE: lowercase #title)

        # Contents
         - [Specification](#specification) 
         - [Dependencies Title](#dependencies-title) 
    
        ## Specification
        Example text blah. Example text blah. Example text blah. Example text blah. 
    Example text blah. Example text blah. Example text blah. Example text blah. 
    Example text blah. Example text blah. Example text blah. Example text blah. 
    Example text blah. Example text blah. 
    
        ## Dependencies Title
        Example text blah. Example text blah. Example text blah. Example text blah. 
    Example text blah. Example text blah. Example text blah. Example text blah. 
    Example text blah. Example text blah. Example text blah. Example text blah. 
    Example text blah. Example text blah. 
    

    A good question was made so I have edited my answer;

    An inner link can be made to any title size using - #, ##, ###, #### I created a quick example below... https://github.com/aogilvie/markdownLinkTest

提交回复
热议问题