diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 31ecb9a..942c426 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -17,8 +17,8 @@
{{ printf `` .Rel .MediaType.Type .Permalink $.Title | safeHTML }}
{{ end -}}
{{ $style := resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "css/style.css" . | toCSS | minify | fingerprint -}}
-
-{{- range .Params.custom_css -}}{{- end -}}
+
+{{- range .Params.custom_css -}}{{- end -}}
{{- block "head" . -}}{{- end -}}
{{- if templates.Exists "partials/extra-head.html" -}}{{- partial "extra-head.html" . -}}{{- end -}}
@@ -39,7 +39,7 @@
{{ $linkshare := resources.Get "js/link-share.js" | minify | fingerprint -}}
{{- end -}}
- {{- range .Params.custom_js -}}{{- end }}
+ {{- range .Params.custom_js -}}{{- end }}
{{- partial "mathjax.html" . -}}
{{- if templates.Exists "partials/extra-foot.html" -}}{{- partial "extra-foot.html" . -}}{{- end }}
diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html
index 0afe081..7512c50 100644
--- a/layouts/shortcodes/figure.html
+++ b/layouts/shortcodes/figure.html
@@ -1,30 +1,103 @@
-
+ {{- else -}}
+ {{- errorf $msg2 $path $.Name $.Position -}}
+ {{- end -}}
+ {{- else -}}
+ {{- errorf $msg3 $path .Name .Position -}}
+ {{- end -}}
+
+{{- else -}}
+
+ {{- if $link -}}{{- end -}}
+
+ {{- if $link }}{{ end -}}
+ {{- if or (or $title $caption) $attr -}}
+
+ {{ with $title -}}{{ . }}
{{- end -}}
+ {{- if or $caption $attr -}}
+ {{- $caption | markdownify -}}
+ {{- with $attrlink }}{{- end -}}
+ {{- $attr | markdownify -}}
+ {{- if $attrlink }}{{ end }}
+ {{- end }}
+
+ {{- end -}}
+
+
+{{- end -}}