- 修改
config.yaml
文件
params:
sidebar:
name: 站长名称
- 修改
.\themes\hugo-theme-stack\layouts\partials\sidebar\left.html
文件
- 修改
.\themes\hugo-theme-stack\layouts\index.html
{{ define "main" }}
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
{{ $filtered := ($pages | intersect $notHidden) }}
{{ $pag := .Paginate ($filtered) }}
{{ range $index, $element := $pag.Pages }}
{{ partial "article-list/default" . }}
{{ end }}
{{- partial "pagination.html" . -}}
{{- partial "footer/footer" . -}}
{{ end }}
{{ define "right-sidebar" }}
{{ partial "sidebar/right.html" (dict "Context" . "Scope" "homepage") }}
{{ end }}
此处评论已关闭