I would like to know how to hide the code cells in my notebook when exporting to Reveal.JS
Starting with a cell that is a slide, e.g.

I) Add a tag using "Property Inspector":
# In JupyterLab → Property Inspector → Cell Metadata
{
"tags": [
"remove-input"
]
}

II) convert to slides manually using nbconvert, specifying a pre-processor that will remove inputs in cells with given tag, e.g.:
jupyter nbconvert Presentation.ipynb --to slides --no-prompt --TagRemovePreprocessor.remove_input_tags={\"remove-input\"} --post serve --SlidesExporter.reveal_theme=simple

The output html file will be in Presentation.slides.html.
Based on this comment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With