This repository has been archived by the owner on Apr 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 106
Hiding a notebook cell #118
Comments
Both jupyter-book and fastpages support this feature. |
The only way that worked for me was this: IPYNB_PREPROCESSORS=[
nbconvert.preprocessors.ExecutePreprocessor(timeout=300),
nbconvert.preprocessors.RegexRemovePreprocessor(patterns=['.*PREAMBLE.*'])] Then every cell that contains # PREAMBLE
import numpy, pandas, seaborn
... |
Although it would be nice to have all (previous) cells execute when giving |
I have achieved removing cell from the pelican output with removing cell by assigning given tag and configuring preprocessor. Steps:
from nbconvert.preprocessors import TagRemovePreprocessor
from traitlets.config import Config
c = Config()
c.TagRemovePreprocessor.remove_cell_tags = ("remove_cell",)
c.TagRemovePreprocessor.enabled = True
IPYNB_PREPROCESSORS=[TagRemovePreprocessor(config=c)] Reference: Removing cells, inputs, or outputs - nbconvert documentation |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi everyone,
I'm a new user of pelican and this plugin and I was wondering if it was possible to hide a specific notebook cell to make it non visible once my notebook is published with pelican. One of my use cases is that usually my notebook start by the classic:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
etc... but I see really few value making this cell visible in my blog posts. Is this feature already implemented in the plugin? Otherwise do you have any ideas how I could do that easily ?
Thank you by advance for your help.
Antoine,
The text was updated successfully, but these errors were encountered: