- Assuming your slides are already defined on your notebook, add the tag
to_remove
to all cells you don't want the code to be shown on your presentation. - Then run this on your terminal:
jupyter nbconvert presentation.ipynb --to slides --no-prompt --TagRemovePreprocessor.remove_input_tags={\"to_remove\"} --post serve --SlidesExporter.reveal_theme=simple