Markdown

Tips: Markdown

Table of Content

Add “Open in Colab” Button

Here is a markdown syntax to create a “Open in Colab” button

<a href="NOTEBOOK_URL" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>

Here is an example for Notebook-04 in Pytorch DeepLearning course:

Open In Colab

Add General Button

Here is the markdown syntax to create a “General Button”

<a href="https://nbviewer.org/github/user/repo/blob/main/notebook.ipynb" target="_blank" 
   style="background-color:#f5f5f5;border-radius:6px;padding:6px 12px;text-decoration:none;
          color:#333;border:1px solid #ccc;">
   View on nbviewer
</a>

View on nbviewer

Convert Markdown to .rst format

  • To convert .md file format to .rst file, this could be done with:

    pandoc input.md -f markdown -t rst -o output.rst
    
    • Make sure to install the pandoc packages on the system: sudo apt ./pandoc--amd64.deb

  • To convert .rst file into html file to review, use rst2html command:

    rst2html input.rst output.html
    

Resources

  • In markdownguide, illustrate the basic syntax in markdown design, including all tips to do and not to do.