mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
added note about pygment example code and markdown processing, updated example
This commit is contained in:
parent
8e368e25b1
commit
d4ed59198a
1 changed files with 4 additions and 3 deletions
|
@ -43,8 +43,9 @@ Highlight takes exactly one required parameter of language and requires a
|
||||||
closing shortcode.
|
closing shortcode.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
The example has an extra space between the “{{” and “%” characters to prevent rendering here.
|
The example has an extra space between the “{{” and “%” characters to prevent rendering here. Since this example is a code block, we use Github flavored Markdown's code fences, ```, to delimit the code. If you are using standard Markdown, instead of the code fence delimiters, each line must be preceeded by 4 spaces to identify each line as a line of code. Not doing either will result in the text being rendered as HTML. This will prevent Pytment highlighting from working.
|
||||||
|
|
||||||
|
```
|
||||||
{{ % highlight html %}}
|
{{ % highlight html %}}
|
||||||
<section id="main">
|
<section id="main">
|
||||||
<div>
|
<div>
|
||||||
|
@ -55,7 +56,7 @@ The example has an extra space between the “{{” and “%” characters to pr
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{{ % /highlight %}}
|
{{ % /highlight %}}
|
||||||
|
```
|
||||||
|
|
||||||
### Example Output
|
### Example Output
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue