feature(config): add config for home profile/posts
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
{{- define "content" -}}
|
||||
<div class="page home">
|
||||
{{- /* Home mode [post] */ -}}
|
||||
{{- if eq .Site.Params.home_mode "post" -}}
|
||||
{{- /* Profile */ -}}
|
||||
{{- /* Profile */ -}}
|
||||
{{- if .Site.Params.home.profile.enable -}}
|
||||
{{- partial "home/profile.html" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Posts */ -}}
|
||||
{{- if .Site.Params.home.posts.enable -}}
|
||||
{{- /* Paginate */ -}}
|
||||
{{- $paginator := where .Site.RegularPages "Type" "posts" -}}
|
||||
{{- $paginator = where $paginator "Params.show_in_homepage" "!=" false -}}
|
||||
{{- with .Site.Params.home_paginate -}}
|
||||
{{- with .Site.Params.home.posts.paginate -}}
|
||||
{{- $paginator = $.Paginate $paginator . -}}
|
||||
{{- else -}}
|
||||
{{- $paginator = $.Paginate $paginator -}}
|
||||
@@ -17,11 +19,6 @@
|
||||
{{- .Render "summary" -}}
|
||||
{{- end -}}
|
||||
{{- partial "paginator.html" . -}}
|
||||
|
||||
{{- /* Home mode [other] */ -}}
|
||||
{{- else -}}
|
||||
{{- /* Profile */ -}}
|
||||
{{- partial "home/profile.html" . -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user