How to convert Jupiter Notebook File to Markdown

1 minute read

Convert Jupyter Notebook (ipynb) to Markdown (MD)

When creating a blog or website to host your portfolio, you may need to convert parts of your Jupyter Notebook into markdown. I personally use Jekyll and need to do so myself. This is actually very simple to do but it took me a lot longer than expected to find how to do this. IN order to do so yourself, you only need to follow these steps:

  1. Create a folder where you will place your notebook file (.ipynb) which you will be converting.

  2. Log in to anaconda prompt and change the working directory into your newly created folder. You will type in the following with the path to YOUR folder (my folder was C:\Users\Francisco\ProgramsFNF\Convert to MD):

    $ cd C:\Users\Francisco\ProgramsFNF\Convert to MD
    
  3. Once you have changed your directory, you will type in the following to convert your notebook file. I am converting a file named Example-Post.ipynb:

    $ jupyter nbconvert -–to markdown Example-Post.ipynb
    

It make take a few seconds but your file will now be converted to a md and your pictures into image files. If you had images such as graphs, you will find a new subfolder created which contains those images. These images will be in PNG format. I hope this helps you!