For example, if I want to refer to a block of code as "Listing 1" in an article, is there a way to render "Listing 1" at the end of that block of code?
E.g:
public class Foo {
}
Listing 1
With backtick_codeblock
you can put the Listing at the top.
This is the syntax.
``` [language] [title] [url] [link text]
code snippet
```
Refer this link for more details.