Customize TableOfContents output

Is it possible to change the output of the TableOfContents? I am trying to utilize Scrollspy with Bootstrap but am unable to add the classes needed to the li’s. I want to highlight the TOC link the user is on as they scroll through the document.

This question has come up in the forum before.

see: Search results for 'add classes toc' - HUGO