maximevaillancourt / digital-garden-jekyll-template

Start your own digital garden using this Jekyll template 🌱

Home Page:https://digital-garden-jekyll-template.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add markdown highlight styling

fabriceliut opened this issue · comments

Is this possible to add this simple styling ? Thx :)

commented

This should be the default in Jekyll, you should simply put the text you want to highlight in a specific liquid tag

You should also be able to use the "triple backtick and format" syntax to highlight a piece of code.

For example, if you add this raw input of Ruby code wrapped in a triple backtick block, with the first triple-backticks annoted with rb to denote that the block contains a snippet of Ruby...

```rb
def foo(bar)
  "baz"
end
```

... Jekyll should generate color-highlighted output that would show up like this in your browser:

def foo(bar)
  "baz"
end

I added a section in the first note that showcases this in more detail (see commit 5d190b6), see it in action here:

https://digital-garden-jekyll-template.netlify.app/your-first-note#code-syntax-highlighting