Yoke Keong

Post Jupyter Notebooks to WordPress using plugin Documents from Git

Jupyter Notebooks are a great way to communicate your findings or demonstrating certain concepts or applications in the Data Science and Machine Learning world. While you can easily convert notebooks to static pages using nbconvert, there are challenges integrating them with existing publishing platforms like WordPress.

If you are just starting out or don’t mind migrating to another platform, there are awesome alternatives such as FastPages (Github and demo site) by Jeremy Howard and Hamel Husain.

However, if for various reasons, you want to continue using WordPress, several workarounds do exists, such as these very well-documented posts here by Mike Kale and here by Silver Ringvee. The downside is that they usually involve adding custom PHP functions and editing the CSS.

I came across this neat little WordPress plugin called Documents to Git (Plugin page and GitHub) that can help to convert Markdown or Jupyter Notebooks to blog posts and all it requires is a short code.

Currently, the Jupyter Notebooks need to be in a public repository and it still requires some CSS edits to make changes, it does so with less fuss (See the documentation in the Github Repository or Plugin page).

Below’s a notebook I used when presenting a TensorFlow 2 workshop in January 2020 with default settings. Have a look and try out the plugin!

Shortcode:

1[git-github-jupyter url="https://github.com/yoke2/tf2_data_to_app_workshop/blob/master/notebooks/tf2_wksp_data_and_modeling.ipynb"]

Converted Notebook:

[git-github-jupyter url=“https://github.com/yoke2/tf2_data_to_app_workshop/blob/master/notebooks/tf2_wksp_data_and_modeling.ipynb”]

<< Previous Post

|

Next Post >>

#Documents-From-Git #Jupyter