Add an optional featured image (#252)
* Make MathJax version 3 work * Change my contributor link * Add an optional featured image and table of contents * Add an optional featured image and table of contents * Add example of a featured image in post along with table of contents * Remove word count criteria * Fix formatting * Add table of contents options * Remove toc feature due to markdown bug * Removing markup configuration Co-authored-by: Luiz F. A. de Prá <luizdepra@users.noreply.github.com>
This commit is contained in:
parent
0a45a52fcb
commit
be94b5fd05
|
@ -12,6 +12,7 @@ categories = [
|
||||||
"golang",
|
"golang",
|
||||||
]
|
]
|
||||||
series = ["Getting Started", "Hugo"]
|
series = ["Getting Started", "Hugo"]
|
||||||
|
featured_image = "https://imgs.xkcd.com/comics/angular_momentum.jpg"
|
||||||
+++
|
+++
|
||||||
|
|
||||||
## Step 1. Install Hugo
|
## Step 1. Install Hugo
|
||||||
|
|
|
@ -27,9 +27,13 @@
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
{{ if .Params.featured_image }}
|
||||||
|
<img src='{{ .Params.featured_image }}' alt="Featured image"/>
|
||||||
|
{{ end }}
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
{{ partial "posts/series.html" . }}
|
{{ partial "posts/series.html" . }}
|
||||||
{{ partial "posts/disqus.html" . }}
|
{{ partial "posts/disqus.html" . }}
|
||||||
|
|
Loading…
Reference in New Issue