Hugo Book 主题配置指南

Hugo Book 主题配置要点

参考资料

显示 Post 属性

提供的 partials 没地方加作者

只能 overwrite layouts/partials/docs/post-meta.html

<h5>
{{ with .Date }}
  {{ partial "docs/date" (dict "Date" . "Format" $.Site.Params.DateFormat) }}
{{ end }}
· 
{{ with .Params.author }}
  {{ . }}
{{ else }}
  {{ .Site.Params.author }}
{{ end }}
</h5>

Extra Customisation

assets/_fonts.scss 替换默认字体

@import url('https://npm.elemecdn.com/lxgw-wenkai-screen-webfont/style.css');

body {
  font-family: "LXGW WenKai Screen", sans-serif;
}

右侧菜单

编写 content/menu/book/index.md

在配置中设置:params.BookMenuBundle: /menu/book

Last updated on 2024-06-11 17:07
Built with Hugo