Use one of the alternatives below.
If you are using the Kirby CLI you can install this plugin by running the following commands in your shell:
$ cd path/to/kirby
$ kirby plugin:install jenstornell/kirby-toc
Make sure that the plugin folder structure looks like this:
site/plugins/kirby-toc/
If you know your way around Git, you can download this plugin as a submodule:
$ cd path/to/kirby
$ git submodule add https://github.com/jenstornell/kirby-toc site/plugins/kirby-toc