ehmatthes / intro_programming

A set of IPython notebooks and learning resources for an Introduction to Programming class, focusing on Python.
MIT License
396 stars 198 forks source link

Only place show/hide all output buttons on notebooks with output blocks #148

Open ehmatthes opened 7 years ago

ehmatthes commented 7 years ago

Right now this is done manually, in build_html_site.py. But this could be automated, either in build_html_site.py or in a template, by checking whether the template has any output blocks. Or, this could be a setting in the notebook metadata.

from build_html.py:

# This is manually determining which notebooks get show/hide all output buttons.
#  Might be better to scrape the files, look for output cells, and only place
#  show/hide all buttons on notebooks with output cells. Can this be done
#  in the template?