#286, Add ability to set image for posts

This commit is contained in:
Alex Shpak 2021-05-03 21:47:19 +02:00
parent e0823c2138
commit c197f3399b
6 changed files with 13 additions and 7 deletions

View File

@ -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="}}

View File

@ -1 +0,0 @@
{"Target":"book.min.284c8fc21ced13c579d9027a9d14893c56b243c6045001180391cebb4cc36ab8.css","MediaType":"text/css","Data":{"Integrity":"sha256-KEyPwhztE8V52QJ6nRSJPFayQ8YEUAEYA5HOu0zDarg="}}

View File

@ -11,3 +11,13 @@
</div>
{{ end }}
{{ end }}
<p>
{{ if .Params.image}}
{{ with .Resources.GetMatch .Params.image }}
<img src={{ .RelPermalink }} />
{{ else }}
<img src={{ .Params.image | relURL }} />
{{ end }}
{{ end }}
</p>

View File

@ -4,9 +4,7 @@
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h1>
{{ partial "docs/post-meta" . }}
<p>
{{- .Content -}}
</p>
</article>
{{ end }}