{{ .LinkTitle }}
- + - + {{ with .Description }}
{{ . }}
{{ end }}
-
+
{{ with .Summary }}
{{ . }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 397702e..3fc7fcd 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -4,7 +4,7 @@
{{ if and .Params.toc .TableOfContents }}
-
+
{{ with .Params.image }}
{{ $imagePath := . }}
+ {{ $imageRes := resources.Get $imagePath }}
{{ $imageExists := false }}
- {{ with resources.Get $imagePath }}
+ {{ $imgWidth := 0 }}
+ {{ $imgHeight := 0 }}
+ {{ with $imageRes }}
{{ $imageExists = true }}
+ {{ if .MediaType }}
+ {{ if hasPrefix .MediaType.MainType "image" }}
+ {{ $imgWidth = .Width }}
+ {{ $imgHeight = .Height }}
+ {{ end }}
+ {{ end }}
{{ else }}
{{ with fileExists (printf "static/%s" $imagePath) }}
{{ $imageExists = true }}
{{ end }}
{{ end }}
-
+
{{ if $imageExists }}
{{ $altText := $.Params.alt | default $.Title }}
-
+
{{ end }}
{{ end }}
-
+
-
+
{{ .Content }}
-
+
-
+
{{ if ne .Params.comments false }}
- {{ if .Site.Params.comments.remark42.enabled }}
+ {{ if site.Params.comments.remark42.enabled }}
{{ partial "comments/remark42.html" . }}
{{ end }}
{{ end }}
@@ -162,119 +160,7 @@