diff --git a/.travis.yml b/.travis.yml index e8b1c94c..7bceaf35 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,16 @@ services: script: - if [ "true" = "${SHELLCHECK-}" ]; then shellcheck *.sh ; fi - if [ -n "${NODE_VERSION-}" ]; then ./test-build.sh $NODE_VERSION ; fi + - if [ "true" = "${DOCTOCCHECK-}" ]; then + nvm install node && + npm i -g doctoc && + cp README.md README.md.tmp && + doctoc --title='## Table of Contents' --github README.md && + diff -q README.md README.md.tmp; + fi env: + - DOCTOCCHECK: true - NODE_VERSION: '4.8' - NODE_VERSION: '6.11' - NODE_VERSION: '7.10' diff --git a/README.md b/README.md index 3c2dc5fc..a2c91cf6 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ The official Node.js docker image, made with love by the node community. + + ## Table of Contents - [What is Node.js?](#what-is-nodejs) @@ -30,6 +32,8 @@ The official Node.js docker image, made with love by the node community. - [Docker Working Group Members](#docker-working-group-members) - [Docker Working Group Collaborators](#docker-working-group-collaborators) + + ## What is Node.js? Node.js is a platform built on Chrome's JavaScript runtime for easily building