Open shanewilkins opened 2 years ago
I think I can give you a couple of pointers.
If you look at the conf.py
file from Nikola, you will find the following lines:
# Do you want to customize the nbconversion of your IPython notebook?
# IPYNB_CONFIG = {}
# With the following example configuration you can use a custom jinja template
# called `toggle.tpl` which has to be located in your site/blog main folder:
# IPYNB_CONFIG = {'Exporter': {'template_file': 'toggle'}}
This means that Nikola does already allows you to hook into the nbconvert
pipeline and to customize the output.
So what that means is that you need to add a preprocessor that will do the things you want.
This is also what was mentioned in the link you've provided.
If you add the metadata to the cell tags directly, you should take a look at the remove preprocessors.
Hope it helps
Requested Feature: (short description)
Users need to be able to hide code input, hide code output and sometimes hide a whole code cell in a Jupyter Notebook. The canonical way to do this since Jupyter 5.0 (~2017) is to add the appropriate tag "hide-cell", "hide-input" or "hide-output" to the metadata for that cell. See here: https://blog.jupyter.org/jupyter-notebook-5-0-909c6c172d78
However, it seems that Nikola doesn't respect these tags--at least it continues to build and display my cells despite them having the right tag.
The only discussion I've managed to find on the google group for this topic is old and was from a previous version of Jupyter. See: https://groups.google.com/g/nikola-discuss/c/Z3lUriHoIrc/m/i5LOAgwLBAAJ
Related Area: (eg. tasks, compilers, configuration, templates…)
Honestly not sure, I'm a newb here.
Do you want to contribute this yourself as a pull request? (don’t worry about it if you don’t want to/can’t — someone else can take care of it)
Sorry, I don't have the skill necessary.
Does this feature affect backwards compatibility? If yes, in what way?
Rationale and full description: (why should it be added to Nikola?)
It's an important feature of making attractive Jupyter Notebooks and Nikola's support of Jupyter was a big part of why I chose Nikola for my blog --- I'm sure I'm not alone in that.