The script can certainly be cleaned up. Some improvements would be in-script refactoring work, some would involve modifying notebooks and templates.
Instead of manually specifying which notebooks get show/hide all output buttons, either set a notebook metadata property and check for that in the template, or examine the notebook and look for any output blocks. If no output blocks, don't include the show/hide all output buttons. (See #148)
Approach to deleting and rebuilding html_site/ has five levels of nesting. That can be simplified or refactored into functions.
The script currently calls nbconvert from the command line from within a python script. I did this because I first learned to use nbconvert from the command line. Since we're using a python script, it would be better to use nbconvert as a library. See here. This might reduce the need for separate files like scripts/my_config.py, and would eliminate the use of environment variables.
The script can certainly be cleaned up. Some improvements would be in-script refactoring work, some would involve modifying notebooks and templates.