Skip to content
removes unnecessary nesting level of table of contents generated by Hugo
Kotlin
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper
src/main/kotlin/de/helmbold/tocfix
.gitignore
LICENSE
README.md
build.gradle
gradlew
gradlew.bat
settings.gradle

README.md

tocfix

This small tool is a workaround for bug in the static site generator Hugo. Hugo generates an unnecessary level of nesting in tables of contents, if the content is structured with h2 (and not h1) headings (and below).

Usage

Download tocfix.jar or build the project from source. You can build the project with gradle bigJar. The generated jar file will be in build/libs. Place the jar file in a directory contained in your PATH, or put it in a the base directory of your Hugo project.

cd some/hugo/project
java -jar tocfix.jar

Prerequisites

JDK 8 for building from source. To run it, JRE 8 is sufficient. You can download the JDK or JRE from Oracle.

You can’t perform that action at this time.