I haven't removed the gray bars but I have made other customizations to Jupyter notebooks with Nikola. What you want to do involves Jupyter's nbconvert utility, not Nikola.
Looking at the nbconvert <https://github.com/jupyter/nbconvert> project on Github, I see some things changed with templating within the past month or so. Still, the following is probably still accurate. The nbconvert utility uses Jinja templates to convert the notebook's JSON file to HTML. (or to LaTeX, for a PDF). You can customize those templates to do whatever you want. Once you create your custom template, you'll need to instruct Nikola to use it. In my conf.py file I have this: IPYNB_CONFIG = {'Exporter': {'template_file': 'ipynb_themes/alt_basic.tpl'}} In that tpl file I have this: {% extends 'basic.tpl' %} {% block data_png scoped %} <div class="output_png output_subarea {{ extra_class }}"> {%- if 'image/png' in output.metadata.get('filenames', {}) %} ....etc The basic.tpl template converts a Jupyter notebook to an HTML fragment that can be placed into a Nikola page or post. By default, Nikola uses Jupyter's basic.tpl template file, but I wanted to override a few things for how it handled images. It would be helpful to you to find Jupyter's basic.tpl file. You'll need to find where the gray bar comes from and override that block. It used to be here: https://github.com/jupyter/nbconvert/tree/master/nbconvert/templates But they refactored it and I don't have time to track it down. When you figure it out, please let me know. This page would probably be useful: https://github.com/ipython/ipython/wiki/Cookbook:-nbconvert-templates Alternatively, you also might be able to add something to your custom.css file. That wouldn't work for all notebook customizations though. -Jim On Thu, Nov 28, 2019 at 9:11 PM John Drake <[email protected]> wrote: > Has anyone have any success with this? > > I don't really know css but would love to know how to make that grey box > disappear. > > Using a custom bootswatch theme (Yeti) with my webpage. > > Thank you! > > On Wednesday, January 16, 2019 at 3:37:01 PM UTC-5, bishop_gate wrote: >> >> thanks i'll try that >> >> On Wednesday, 16 January 2019 14:59:03 UTC-5, Roberto Alsina wrote: >>> >>> You would have to create some CSS rule and add it to your custom.css >>> >>> On Tue, Jan 15, 2019, 21:38 bishop_gate <[email protected]> wrote: >>> >>>> Hi, >>>> >>>> >>>> How do I remove the grey bars next to my jupyter notebooks as they are >>>> taking up valuable real estate on the web page? >>>> >>>> thanks >>>> >>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "nikola-discuss" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- > You received this message because you are subscribed to the Google Groups > "nikola-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/nikola-discuss/da093d76-37c2-4f96-a63f-8b6219ec3a3b%40googlegroups.com > <https://groups.google.com/d/msgid/nikola-discuss/da093d76-37c2-4f96-a63f-8b6219ec3a3b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/CAKUYxW%2BXXqS3gKYv1e-DUitrGwt8R3xU8-PQsJO_mMWTNBzpnQ%40mail.gmail.com.
