MP

TIL tree Can Output HTML

This is a quick one. I wanted to make a quick and easy HTML "file directory" like you often see on old servers. I found this answer on Stack Overflow and, lo! You can get it straight out of tree, which you almost certainly already have installed.

The directory here was generated with the following command:

❯ tree -H '.' \
      -L 1 \
      --noreport \
      --houtro "" \
      --dirsfirst \
      --charset utf-8 \
      --ignore-case \
      -I "index.html" \
      -T 'Dynamic LaTeX Example' \
      -o index.html

Talk about easy peasy.

Created: 2026-05-12

Tags: html, unix, web