Hacker News new | ask | show | jobs
by hemanta212 2550 days ago
I am also building one link[1] but for processing jupyter notebooks to responsive html primarily. You can also refer to this blog[2] to generate html from ipynb file.

1. https://github.com/hemanta212/blogger-cli/tree/add_templatin...

2. https://nipunbatra.github.io/blog/2017/Jupyter-powered-blog....

My site. https://hemanta212.github.io/blog/

1 comments

Thanks for the note. Looks good!

Blog post generation from Jupyter Notebooks is definitely something that I plan to add to mine. Hopefully `nbconvert` and my Jinja2 templates get me 90% of the way there; having yours as a reference will be useful if anything really trips me up.

Taking a look at your blog post, don't forget that Bootstrap has a lot of classes built in that make prettifying things like tables really easy [1]. In Sitegen, I apply a few Bootstrap classes to all tables in the BeautifulSoup object like so:

  for table in soup_body.find_all('table'):
      table['class'] = 'table table-striped table-sm table-hover'
  return soup_body
Refer to the `add_table_tags` function here [2] to see what I did directly.

[1] https://getbootstrap.com/docs/4.3/content/tables/

[2] https://github.com/ggoss/sitegen/blob/master/sitegen/md_proc...