mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-15 08:49:27 -04:00
Fix code example
This commit is contained in:
parent
05aaee8cec
commit
f78cf64909
@ -143,8 +143,7 @@ This example HTML code block tells Hugo users the following:
|
|||||||
2. This snippet is complete enough to be downloaded and implemented in a Hugo project, as demonstrated by `download="single.html"`.
|
2. This snippet is complete enough to be downloaded and implemented in a Hugo project, as demonstrated by `download="single.html"`.
|
||||||
|
|
||||||
```
|
```
|
||||||
{{%/* code file="layouts/_default/single.html" download="single.html" */%}}
|
{{</* code file="layouts/_default/single.html" download="single.html" */>}}
|
||||||
```
|
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<main>
|
<main>
|
||||||
<article>
|
<article>
|
||||||
@ -162,14 +161,14 @@ This example HTML code block tells Hugo users the following:
|
|||||||
</article>
|
</article>
|
||||||
</main>
|
</main>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
```
|
{{</* /code */>}}
|
||||||
{{%/* /code */%}}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Example 'code' Display
|
##### Example 'code' Display
|
||||||
|
|
||||||
The output of this example will render to the Hugo docs as follows:
|
The output of this example will render to the Hugo docs as follows:
|
||||||
|
|
||||||
|
```html
|
||||||
{{< code file="layouts/_default/single.html" download="single.html" >}}
|
{{< code file="layouts/_default/single.html" download="single.html" >}}
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<main>
|
<main>
|
||||||
@ -189,6 +188,7 @@ The output of this example will render to the Hugo docs as follows:
|
|||||||
</main>
|
</main>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{< /code >}}
|
{{< /code >}}
|
||||||
|
```
|
||||||
|
|
||||||
<!-- #### Output Code Block
|
<!-- #### Output Code Block
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user