Octopress / Jekyll syntax syntax: What are the benefits of `` `(backlinks) versus {% codeblock%} (liquid extensions) etc.?

I use Octopress for blogging, but I still don’t quite understand the difference, if any, between the "fluid extension" "-style code blocks using {% codeblock %} and the more normal tagged code blocks using backlinks as well as options provided by my kramdown and other converters. That is:

 {% codeblock haskell %} main = putStrLn "Hello world" -- liquid style {% endcodeblock %} 

against.

 ```haskell main = putStrLn "Hello world" -- backtick fencing style (GitHub-flavored) ``` 

against.

 ~~~ haskell main = putStrLn "Hello world" -- kramdown tilde fencing ~~~ 

against.

  main = putStrLn "Hello world" -- another kramdown style, I think {:lang="haskell"} 

and etc.

Octopress provides versions of {% codeblock %} and backtick as "plugins", and they seem to support the same stuff: syntax highlighting, file names for code, URLs, etc.

I did not have the opportunity to work with kramdown, I think, because they depend on coderay or something that I loaded but cannot work.

Anyway, here is my question :

Is there any reason to prefer one syntax style over another? On the one hand, I like fencing with a reverse stroke, because it’s a GitHub discount that I’m used to, and which seems β€œsimpler”, but on the other hand, the liquid syntax seems to be more β€œnative” to Octopress.

Any thoughts would be greatly appreciated. At the moment, my posts have a random combination of styles, and I would really like to optimize them into one style.

+7
source share
1 answer
 {% codeblock haskell %} main = putStrLn "Hello world" -- liquid style {% endcodeblock %} 

requires liquid

 ```haskell main = putStrLn "Hello world" -- backtick fencing style (GitHub-flavored) ``` 

not " portable "

 ~~~ haskell main = putStrLn "Hello world" -- kramdown tilde fencing ~~~ 

my choice

  main = putStrLn "Hello world" -- another kramdown style, I think {:lang="haskell"} 

outdated

+6
source

All Articles