Export note content to HTML with only code cell styling

What I’m trying to do

I want to export some notes as HTML to publish in my GitHub Pages website, however there I have my native CSS that I want to keep. I need the HTML of the text, tables and the images embedded, but nothing else from the theme… except I want the css that formats the code cells because it’s so pretty. Is there any way to accomplish this?

Things I have tried

Using the Webpage HTML Export plugin, but I can’t seem to get an export without sidebars (empty if I disable the document table of content) and the whole theme coming with. I want to at least know what css to delete from this export but it seems like a bigger hassle to have to export and examine and delete like 400 lines.

I have some Jupyter Notebooks that I had turned into .md and I want to give this treatment (because the css from exporting a notebook directly to html is a nightmare, even using the -basic flag with nbconvert), and some plain notes I’ve written as articles to then export.

I’ll appreciate any ideas.

Hi, I don’t know if you are still looking at this but I am the developer of the Webpage HTML Export plugin. You can disable the sidebars by including this simple snippet:

.sidebar
{
display: none;
}

You can also remove the theme by deleting the “theme.css” file from the /lib/styles folder in your final export. That’s it.

You should be able to include only part of your theme by copying out the part you want and saving it as a snippet.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.