TL;DR: Be careful, you need to align them perfectly.

What I want to archive is the nested code snippet inside ordered list item, so the numbers count continuously.

First Version

This is when I just type normally as I always do in other markdown files.

Markdown

1. Check Ruby version. If it's not 2.0.0 or higher, [install it][ruby].
    
    ```bash
    ruby --version
    ruby 2.X.X
  1. Second sentence. Bla bla bla.

     ruby --version
     ruby 2.X.X
    

    ```

Output

  1. Check Ruby version. If it’s not 2.0.0 or higher, [install it][ruby].

     ruby --version
     ruby 2.X.X
    
  2. Second sentence. Bla bla bla.

     ruby --version
     ruby 2.X.X
    

The structure I used was number + dot + space + content. But the output is rendered as an inline code like this, bash ruby --version ruby 2.X.X

The Correct Way

Markdown

Note: ^ points out a space I added, to align the list item with the fenced code block precisely which starts with 4 spaces.

1.  Check Ruby version. If it's not 2.0.0 or higher, [install it][ruby].
   ^    
    ```bash
    ruby --version
    ruby 2.X.X
  1. Second sentence. Bla bla bla.

    ruby --version
    ruby 2.X.X
    

    ```

Output

  1. Check Ruby version. If it’s not 2.0.0 or higher, [install it][ruby].

    ruby --version
    ruby 2.X.X
    
  2. Second bla bla

    ruby --version
    ruby 2.X.X
    

Conclusion

I don’t know if this is a common issue (or maybe it is the standard?). Anyway, I got what I want. Perfect.


Customization To-do list:

  • Permalink: should I contain dates in the URL?
  • Fix fenced code block nested in un/ordered lists
  • Fix the Checkbox
  • Add images with captions to my post
  • Add comments functionality
  • Change a Theme
  • Adding a Navigation
  • Change the code highlighting theme
  • Custom 404 page
  • Create _pages folder for all your pages
  • Add tags to post
  • Change the About page
  • Multilingual?
  • Add search functionality