feat: add social icons and template bug fixes

This commit is contained in:
Vivek R
2019-04-20 00:22:50 +05:30
parent e9b2b8f64d
commit b89ed755ef
9 changed files with 102 additions and 15 deletions

View File

@@ -13,11 +13,14 @@
{{ end }}
<ul class="posts">
{{- range first .Site.Params.SidebarRecentLimit .Data.Pages -}}
{{- range .Data.Pages -}}
{{- if (in (.Site.Params.excludedTypes | default (slice "page")) .Type) -}}
{{- else -}}
<li class="post">
<a href="{{ .RelPermalink }}">{{.Title}}</a> <span class="meta">{{ dateFormat "Jan 2, 2006" .Date }}</span>
</li>
{{- end -}}
{{- end -}}
</ul>
</div>

View File

@@ -14,9 +14,19 @@
{{ .Content }}
</div>
{{ partial "disqus.html" . }}
</div>
{{- $.Scratch.Set "isDisqus" true -}}
{{- if and (isset .Params "disqus") (eq .Params.disabledisqus false) -}}
{{- $.Scratch.Set "isDisqus" false -}}
{{- end -}}
{{- if and (isset .Params "type") (in (.Site.Params.disableDisqusTypes | default (slice "page")) .Params.type) -}}
{{- $.Scratch.Set "isDisqus" false -}}
{{- end -}}
{{- if eq ($.Scratch.Get "isDisqus") true -}}
{{- partial "disqus.html" . -}}
{{- end -}}
</div>
{{ partial "footer.html" . }}
</body>
</html>