You can include code blocks in your post, with automatic syntax highlighting (color!). See the highlight.js website for a demo and more details: https://highlightjs.org/static/demo/
``` (triple backticks) to create a code fence around your block of code will automatically highlight the code. To tell the highlighter which language your code is in, type the language immediately after the beginning triple backtick like this: ```php
So, putting it all together, you can
```LANG your code here ```
``` your code here ```
And hope that your code is enough for the parser to figure out which language to use.
What languages are recognized/supported?
We could add more, but don’t want to hurt performance of the site.
/* php */ echo "hello world";
# bash echo "hello world";
As an aside, single backticks around your content produce “preformatted text”
This is what text looks like when surrounded by single backticks
Also, indenting a whole block of text by four spaces turns on the syntax highlighter.
this is content indented four spaces echo "hello world"