Hide Code when exporting Jupyter notebook to HTML

Ahmed Lahlou Mimi picture Ahmed Lahlou Mimi · Apr 18, 2018 · Viewed 33.8k times · Source

I'm looking for a way to hide code cells (inputs) when export my .iipynb file to a HTML. I don't want the code cells to be visible at all (not some button that turn them off/on). The output is for people that have no idea what a programming language is. I tried many things that I found on the internet but nothing seems to work.

Thanks

Answer

vincentVega picture vincentVega · Oct 23, 2019

as of now (nbconvert version 5.6.0) the easiest solution seems to be to provide the argument --no-input when using the CLI interface of nbconvert:

jupyter nbconvert yourNotebook.ipynb --no-input

it works like magic more info here