How To Use Jupyter Notebook As Hugo Blog Post

April 10, 2020
data science hugo
Estimated Reading Time: 1 minute(s)


  1. The first cell in the notebook should be a markdown cell with a Hugo header. Example:

    ---
    title: "How To use Jupyter Notebook As Hugo Blog Post"
    date: 2020-04-10
    tags: ["data science", "hugo"]
    draft: false
    ---
    
  2. Write all your python code and markdown annotations in the Notebook as normal

  3. Once done, remember one can individually select if a cell will be exported to Markdown or not by clicking the wrench on the side “Notebook Tools” and selecting a different “Raw NBConvert Format”

  4. At the end of the notebook, call the following command to convert the notebook to markdown !jupyter nbconvert --to markdown Untitled.ipynb

  5. (This step may be skipped if you have no figures) Move the files directory that is created, which holds images, so the Hugo blog post can render the images using this command

    !mv Untitled.md path/to/content/directory/Untitled.md
    !cp -r Untitled_files path/to/static/directory
    

    which requires one to install this package $ pip install jupyter_contrib_nbextensions

And after writing this, I forgot that I’ve used the hugo jupyter package in the past to achieve the same thing. Leaving this post up for historical and documentation reasons

Data Science From Scratch To Production MVP Style: Deploy To AWS Lambda

April 11, 2020
data science production flask api aws s3 lambda

Data Science From Scratch To Production MVP Style: API

April 10, 2020
data science production flask api

Data Science From Scratch To Production MVP Style: Model

April 9, 2020
data science production scikit-learn model
comments powered by Disqus