I strongly advise against manually building a table of contents. It's a pain to make them, and even more of a pain to maintain them.

Instead, let software take care of this for you. Here are two GitBook plugins that I just found for making tables of contents:

  • https://www.npmjs.com/package/gitbook-plugin-page-toc
  • https://www.npmjs.com/package/gitbook-plugin-simple-page-toc

Plugins can be enabled within the editor or by editing the book.json file.

Answer from Chris on Stack Overflow
🌐
Gitbooks
seadude.gitbooks.io › learn-gitbook › content › chapter1 › internal.html
Internal Links · Learn Gitbook - SeaDude
Internal Links are hypertext links from one article... ...to a heading using heading name within the same gitbook
🌐
Gitbooks
seadude.gitbooks.io › learn-gitbook › content › chapter2 › external.html
External Links · Learn Gitbook - SeaDude
[your gitbook](https://seadude.gitbooks.io/linking/content/chapter1/internal.html) Format: https://<username>.gitbooks.io/<bookname>/content/<chapter>/<article>.html · Link to specific heading in an article ·
Discussions

Is it possible to add internal absolute links?
How can one make an absolute internal link? If I'm in the file /foo/bar.md, and I write the following: [my link](/absolute/link/to/file.md) The link that is created is to: /foo/absolute/link/to... More on github.com
🌐 github.com
1
April 8, 2015
Is it possible to add internal links?
I was wondering if there is a way to add links pointing to other sections in the same book. Ideally, all sections (marked as headers in the markdown source) could be targets, but it would already b... More on github.com
🌐 github.com
12
December 17, 2014
Broken Internal Links Render as GitHub URLs Instead of Showing Error
When a GitBook site is synced bidirectionally with GitHub, broken internal file references (mentions) are incorrectly rendered as links to the GitHub repository instead of being handled as broken l... More on github.com
🌐 github.com
0
December 5, 2025
Relative links inside a page don't get transformed into links ending with html on windows version 2.0.1
* [Array](../myfolder/array.md) this link inside a myfolder/README.md doesn't get transformed into a link ending with .html. Instead the md file is linked. On mac this works. More on github.com
🌐 github.com
15
April 22, 2015
🌐
Garyng
garyng.xyz › gtil-gitbook › GitBook › relative-internal-links-in-gitbook.html
Relative Internal Links in GitBook · Today I Learned... - Gary Ng
GitBook cli will convert .md link to .html · Tip: Just copy from SUMMARY.md and add ../ infront of the link
🌐
GitBook
docs.gitbook.com › creating-content › broken-links
Broken links | GitBook Documentation
February 4, 2025 - This filter is useful for making sure your published docs don’t link to internal content within your GitBook organization. It’ll show any links to internal, unpublished content that readers of your published content won’t have access to (i.e. links that start app.gitbook.com/o/<organizationID>/…).
🌐
GitHub
github.com › GitbookIO › gitbook › issues › 697
Is it possible to add internal absolute links? · Issue #697 · GitbookIO/gitbook
April 8, 2015 - How can one make an absolute internal link? If I'm in the file /foo/bar.md, and I write the following: [my link](/absolute/link/to/file.md) The link that is created is to: /foo/absolute/link/to/file.html and not: /absolute/link/to/file.h...
Author: GitbookIO
🌐
GitHub
github.com › GitbookIO › gitbook › issues › 535
Is it possible to add internal links? · Issue #535 · GitbookIO/gitbook
December 17, 2014 - I was wondering if there is a way to add links pointing to other sections in the same book. Ideally, all sections (marked as headers in the markdown source) could be targets, but it would already b...
Author: GitbookIO
Find elsewhere
🌐
GitHub
github.com › GitbookIO › gitbook-cli › issues › 59
Navigating to internal link causes exception · Issue #59 · GitbookIO/gitbook-cli
April 11, 2017 - An internal link is one that is accessible from within the documentation only - NOT cataloged in the TOC (SUMMARY.md).
Author: GitbookIO
🌐
GitHub
github.com › GitbookIO › public-docs › blob › main › creating-content › broken-links.md
public-docs/creating-content/broken-links.md at main · GitbookIO/public-docs
This filter is useful for making sure your published docs don’t link to internal content within your GitBook organization. It’ll show any links to internal, unpublished content that readers of your published content won’t have access to (i.e. links that start app.gitbook.com/o/<organizationID>/…).
Author: GitbookIO
🌐
GitBook
docs.gitbook.com › creating-content › blocks › page-link
Page links | GitBook Documentation
October 24, 2024 - Page link blocks are the best way create relations between different pages within your content.
🌐
GitBook
gitbook.com › docs › creating-content › formatting › inline
Inline content | GitBook Documentation
July 3, 2026 - If you want to link to a page in ... insert the link, or select some text. Hit / to open the inline palette and choose Link, click the Link button in the context menu, or hit ⌘ + K....
🌐
GitBook
docs.gitbook.com › guides › improve-your-docs › quick-tips-to-improve-your-technical-writing-workflow-in-gitbook
Quick tips to improve your technical writing workflow in GitBook | GitBook Documentation
Because if someone changes the URL, name, or location of the linked content, GitBook will still keep its reference up to date. And that means fewer broken links. If your technical documentation is part of your team’s internal knowledge base, you can link to other anchors, pages, or spaces within your internal content.
🌐
Shutterstock
tech.shutterstock.com › 2018 › 11 › 05 › gitbook-plugin-related-links
Managing Related Links with an Open-Source GitBook Plugin
November 5, 2018 - As we worked out the architecture ... internal Shutterstock systems, we had to reorganize and rename individual pages, and it was tiring to fix hard-coded links every time we renamed pages. With this plugin, we still have to verify that the link to the target page still make sense in context, but we don’t have to copy and paste the title of the page over and over. You can have a look at the plugin here, and you can install it in your GitBook by adding ...
🌐
GitHub
github.com › GitbookIO › gitbook › issues › 3850
Broken Internal Links Render as GitHub URLs Instead of Showing Error · Issue #3850 · GitbookIO/gitbook
December 5, 2025 - The broken internal reference is automatically converted to a GitHub repository URL pointing to the non-existent file path. Example markdown referencing a no longer existing file: See further documentation [mytool.md](mytool.md "mention") This results in the rendered documentation on the GitBook site to look like this with a fully rendered GitHub link:
Author: GitbookIO
🌐
GitBook
gitbook.com › blog › new-introducing-docs-sites
New in GitBook: A better way to publish your documentation | GitBook Blog
July 17, 2024 - Next up, we’ve got a new feature to help you make sure the links you add to your docs work correctly and don’t give your users an error. That’s right — we’ve added a new way to find and fix broken internal links in your spaces. Before your merge a change request or after you edit ...
🌐
GitHub
github.com › GitbookIO › gitbook › issues › 721
Relative links inside a page don't get transformed into links ending with html on windows version 2.0.1 · Issue #721 · GitbookIO/gitbook
April 22, 2015 - GitbookIO / gitbook Public · Notifications · You must be signed in to change notification settings · Fork 4k · Star 28.2k · New issueCopy link · New issueCopy link · Closed · Closed · Relative links inside a page don't get transformed into links ending with html on windows version 2.0.1#721 ·
Author: GitbookIO
🌐
Stack Overflow
stackoverflow.com › questions › 72778836 › gitbook-external-links-as-blocks
Gitbook external links as blocks - Stack Overflow
Normally, it only allows to link pages that are inside the documentation. ... Have you tried reading the gitbook docs ?
🌐
GitHub
github.com › orgs › GitbookIO › discussions › 577
Add functionality to allow some links to be opened in a new tab · GitbookIO · Discussion #577
Concerning the case of embedding the page in an iframe, we could consider detecting it in https://github.com/GitbookIO/gitbook/blob/main/packages/gitbook/src/components/primitives/Link.tsx#L53-L59 and opening external links outside the iframe.