Refactor table of contents building

80 jobs for anakashima/gitlab-ce-fix_wiki_toc_indent in 81 minutes and 45 seconds (queued for 12 minutes and 42 seconds)