mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2024-11-22 03:19:25 +00:00
#286, Add ability to set image for posts
This commit is contained in:
parent
e0823c2138
commit
c197f3399b
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
{"Target":"book.min.6c7c6446dfdee7c8c933e9bbc6e80ee3ed6c913b2a59519f2092c3c6a9d63e55.css","MediaType":"text/css","Data":{"Integrity":"sha256-bHxkRt/e58jJM+m7xugO4+1skTsqWVGfIJLDxqnWPlU="}}
|
{"Target":"book.min.5ac6c2989f0943405962be6800b442aef429ef26ade26545ecf0617a21d1197a.css","MediaType":"text/css","Data":{"Integrity":"sha256-WsbCmJ8JQ0BZYr5oALRCrvQp7yat4mVF7PBheiHRGXo="}}
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
|||||||
{"Target":"book.min.284c8fc21ced13c579d9027a9d14893c56b243c6045001180391cebb4cc36ab8.css","MediaType":"text/css","Data":{"Integrity":"sha256-KEyPwhztE8V52QJ6nRSJPFayQ8YEUAEYA5HOu0zDarg="}}
|
|
@ -11,3 +11,13 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{{ if .Params.image}}
|
||||||
|
{{ with .Resources.GetMatch .Params.image }}
|
||||||
|
<img src={{ .RelPermalink }} />
|
||||||
|
{{ else }}
|
||||||
|
<img src={{ .Params.image | relURL }} />
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</p>
|
||||||
|
@ -4,9 +4,7 @@
|
|||||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||||
</h1>
|
</h1>
|
||||||
{{ partial "docs/post-meta" . }}
|
{{ partial "docs/post-meta" . }}
|
||||||
<p>
|
{{- .Content -}}
|
||||||
{{- .Content -}}
|
|
||||||
</p>
|
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user