diff --git a/.travis.yml b/.travis.yml
index c79d710..ec24976 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -55,6 +55,7 @@ script:
after_script:
- mv -i coverage docs ~/gh-pages
+- make/make-indexes.sh ~/gh-pages
- mkdir -p ~/gh-pages/lib/doc/MathJax
- echo 'document.write("");' > ~/gh-pages/lib/doc/MathJax/MathJax.js
- touch ~/gh-pages/.nojekyll
diff --git a/graph-lib/make/make-indexes.sh b/graph-lib/make/make-indexes.sh
new file mode 100644
index 0000000..543a670
--- /dev/null
+++ b/graph-lib/make/make-indexes.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+find "$@" -type d -print0 | xargs -n 1 -r0 bash -c '(shopt -s nullglob; cd "$0"; if (! test -e index.html) || test -e .make-index-html; then touch .make-index-html; echo "" > index.html; for i in */ *.html; do if test "$i" != "index.htm"; then echo "$i" >> index.html; fi; done; echo "" >> index.html; fi)'
diff --git a/graph-lib/make/make.rkt b/graph-lib/make/make.rkt
index a5ba0c7..6ba8f60 100644
--- a/graph-lib/make/make.rkt
+++ b/graph-lib/make/make.rkt
@@ -204,5 +204,12 @@
"-s" "doc"
"-s" "test"
"-f" "html"
- "-f" "coveralls"
+ ,@(let ([travis (getenv "TRAVIS")])
+ (if (and travis (string=? travis "true"))
+ '("-f" "coveralls")
+ '()))
,@(exclude-dirs rkt-files (list "make/"))))
+
+(run! `(,(find-executable-path-or-fail "bash")
+ "make/make-indexes.sh"
+ "docs/"))