Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2020-05-12 19:45:19 +0300
committerGitHub <noreply@github.com>2020-05-12 19:45:19 +0300
commit762a7e538d291e0ede8ca4d64b2fcf12ec5d8e9c (patch)
treef06f89d019773095e90e74f06d3bf699d0e9da44 /layouts/index.html
parent6aa05a7f3e4ab75d4c7847d15a4af36375d1c4f0 (diff)
feat(compatibility): improve compatibility for Hugo basic version (#352)
Diffstat (limited to 'layouts/index.html')
-rw-r--r--layouts/index.html11
1 files changed, 7 insertions, 4 deletions
diff --git a/layouts/index.html b/layouts/index.html
index 7800611..eabc90c 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,8 +1,11 @@
{{- define "content" -}}
{{- $params := .Scratch.Get "params" -}}
- <div class="page home">
+ {{- $profile := .Site.Params.home.profile -}}
+ {{- $posts := .Site.Params.home.posts -}}
+
+ <div class="page home"{{ if ne $posts.enable false }} posts{{ end }}>
{{- /* Profile */ -}}
- {{- if ne .Site.Params.home.profile.enable false -}}
+ {{- if ne $profile.enable false -}}
{{- partial "home/profile.html" . -}}
{{- end -}}
@@ -16,7 +19,7 @@
{{- end -}}
{{- /* Posts */ -}}
- {{- if ne .Site.Params.home.posts.enable false | and .Site.RegularPages -}}
+ {{- if ne $posts.enable false | and .Site.RegularPages -}}
{{- /* Paginate */ -}}
{{- $pages := where .Site.RegularPages "Type" "posts" -}}
{{- if .Site.Params.page.hiddenFromHomePage -}}
@@ -24,7 +27,7 @@
{{- else -}}
{{- $pages = where $pages "Params.hiddenfromhomepage" "!=" true -}}
{{- end -}}
- {{- with .Site.Params.home.posts.paginate | default .Site.Params.paginate -}}
+ {{- with $posts.paginate | default .Site.Params.paginate -}}
{{- $pages = $.Paginate $pages . -}}
{{- else -}}
{{- $pages = .Paginate $pages -}}