If your Feather Wiki has extra long pages with many headings splitting up contents, this can help your readers jump to exactly the content they need without having to scroll to find it first.
Once installed, you can type <toc></toc>
anywhere on a page, and the extension will replace that code with a table of contents that contains all of the headings on your page in a nested list that links to each heading. You will need to utilize HTML or Markdown headings depending on what editor you are using for this extension to function properly.
This extension is super simple and has no frills—literally just type <toc></toc>
exactly like that in any editor at the spot on the page where you want the table of contents to appear. If your page uses <h1>
, <h2>
, <h3>
, etc. for HTML or #
, ##
, ###
, etc. for Markdown, then the table of contents will be inserted in place of the <toc></toc>
you typed!
Installation #
To use the auto table of contents extension, you can do one of the following things:
- Go to your Wiki Settings and add
to the "Custom Head" text area.<script src="https://feather.wiki/extensions/v1.8.x/table-of-contents.js"></script>
- Save the auto table of contents extension file to the same folder as your Feather Wiki file and add
to the "Custom Head" text area in Wiki Settings.<script src="./table-of-contents.js"></script>
- (This way requires that the
table-of-contents.js
file always remains in the same folder as your wiki file.)
- (This way requires that the
- Go to the source code for the extension, copy the code, and paste the whole script directly into the "Custom JS" text area in Wiki Settings.
After adding the extension code to your wiki, save your changes and reload the wiki. You will not be able to see the results until you save your wiki and re-load the file.
Previous Versions #
Starting with Version 1.8.0, extensions are now stored in paths that include the minor version number (i.e. extensions for version 1.8.0 are stored in extensions/v1.8.x/
) to indicate that they are incompatible with lower version numbers. The version of this extension compatible with versions of Feather Wiki below 1.8.0 can still be found at https://feather.wiki/extensions/table-of-contents.js
, but the old version will no longer receive updates.