How to hide the markdown while converting a notebook to html format
Question:
I have written a code to display few plots related to my project and I have to convert it to html form for better visualization. I have managed to remove the lines of code using the following piece of code
os.system('jupyter nbconvert plots.ipynb --to html --no-input ')
The lines of code have gone but not the markdowns . Is there any command to remove them as well and display only the plots which I have got. I don’t want to remove the markdowns from original code as I need it for the explanation of code.
Answers:
You can use TemplateExporter.exclude_markdown
(exporter options). Then your command will be:
jupyter nbconvert plots.ipynb --to html --no-input --TemplateExporter.exclude_markdown=True
I have written a code to display few plots related to my project and I have to convert it to html form for better visualization. I have managed to remove the lines of code using the following piece of code
os.system('jupyter nbconvert plots.ipynb --to html --no-input ')
The lines of code have gone but not the markdowns . Is there any command to remove them as well and display only the plots which I have got. I don’t want to remove the markdowns from original code as I need it for the explanation of code.
You can use TemplateExporter.exclude_markdown
(exporter options). Then your command will be:
jupyter nbconvert plots.ipynb --to html --no-input --TemplateExporter.exclude_markdown=True