Chapter 1


  1. Internal Links are hypertext links from one article...

    1. ...to a heading using heading name within the same gitbook

    2. ...to a heading using a custom name within the same gitbook

    3. ...to another article within the same gitbook

  2. Internal Links come in two flavors:

    1. Relative internal links

      1. "Relative" refers to the fact that the links are relative to the folder structure you build for your gitbook (in the "Files Tree" of the online editor or a local folder structure).
    2. HTML internal links

      1. "HTML" refers to each link being a URL with online usage only. These links cannot be used for offline reading of PDF's.

Examples:

Link to article heading using heading name:

  • Relative Internal Link to a heading in the SAME article:
    • Syntax:

        [heading](#test)
      
    • Format:

        [link text](#<heading-name>) 
      
  • Relative Internal Link to a heading in ANOTHER article: (notice the "../")
  • NOTE: This syntax links to the appropriate anchor tag for a split second, then takes me to the top of the article.

    • Syntax:

        [heading](../chapter2/test.md#h5)
      
    • Format:

        [link text](../<chapter>/<article>.md#<heading-name>)  
      
  • HTML Internal Link to a heading in the SAME article:
    • Syntax:

        [heading](https://seadude.gitbooks.io/linking/content/chapter1/internal.html#test)
      
    • Format:

        [link text](https://<username>.gitbooks.io/<bookname>/content/<chapter>/<article>.html#<heading-name>)
      
  • HTML Internal Link to a heading in ANOTHER article:
    • Syntax:

        [heading](https://seadude.gitbooks.io/linking/content/chapter2/test.html#h5)
      
    • Format:

        [link text](https://<username>.gitbooks.io/<bookname>/content/<chapter>/<article>.html#<heading-name>)
      

Link to article heading using custom name:

  • Link to custom header in SAME article:
    • Syntax:

        [custom header](#test-me)
      
    • Format:

        [link text](#<anchor-tag>)
      
    • Syntax:

        [custom header](../chapter2/external.md#random-tag)
      
    • Format:

        [link text](../<chapter>/<article>.md#<heading-name>)
      

    Whats the difference?

    • The relative link (to the .md file) works in both PDF and the online editor.

    • The HTML link is better suited for the online editor.


Link to article:

  • Relative Internal Link to an article in the SAME gitbook:
    • Syntax:

        [article](../chapter2/external.md)
      
    • Format:

        [link text](../<chapter>/<article>.md) 
      
  • HTML Internal Link to a article in the SAME gitbook:
    • Syntax:

        [article](https://seadude.gitbooks.io/linking/content/chapter2/external.html)
      
    • Format:

        [link text](https://<username>.gitbooks.io/<bookname>/content/<chapter>/<article>.html#<heading-name>)
      

Link from Subchapter Article to Subchapter Article:

(Believe it or not...It's a different syntax!)

  • Syntax:

        [visit this link](../chapter2/test.md#get-there)
    
  • Format:

      (../<chapter>/<article>.md#heading)
    

Can you believe it! The awesome folks at Gitbook has WYSIWYG'd the UI. You can now drag and drop links to images and (after a bit of cleanup) articles right into your book.

To drag and drop images:

  • Drag image into gitbook
  • By default, gitbook places your image at the root of the book
  • Right click, "Rename" and add a subfolder if you wish
  • Open subfolder, then just drag into your gitbook!
  • Easy peasy

Important:

  1. Naming conventions:

    1. Be careful with how you name and build your SUMMARY.md
  2. Headings:

    1. You can link to H1-H5 headings by using a single "#" in the link syntax

    2. Heading syntax must be all lower case, spaces converted to "-" (dashes).

  3. PDF:

    1. Internal Links that end in a folder name [link](../chapter), links ending in .html, or .html#heading will not work in PDF.
    2. The only links that work in PDF are to link to the original .md versions of files
  4. Root directory README.md file:

    1. Your root "README.md" file will render to "index.html" when converted by Gitbook to a static site.

    2. If linking TO and FROM your root README.md file, you will need alter your link syntax as follows:

      1. Linking to root README.md file:

      2. Syntax:

          [README.md](/README.md/#test)
        
      3. Format:

          [link text](/README.md)
        
      4. Link from root README.md file to "Important" heading in this chapter:

      5. Syntax:

         [Chapter 1](/chapter1/internal.md#important)
        
      6. Format:

          [link text](/<chapter>/<article>.md#<header-name>)
        





































































































































Test





































































































































Test HTML Anchored Heading

  • Syntax:

    # Test HTML Anchored Heading {#test-me}
    

    PREVIOUSLY TRIED BOTH OF THESE, NEITHER WORK

     # Test HTML Anchored Heading <a name="test-me"></a> <!--previous-->
    
     # <a name="test-me">Test HTML Anchored Heading</a> <!--current-->
    
  • Format:
     # Heading Name {#anchor-name}
    

Lets see if this Slack webhook works!! Can you see me on my Slack Channel??

results matching ""

    No results matching ""