概要
Stack 是 Github 上开源的一个 Hugo 的主题,其提供了模板页面,简化了 Hugo 的部分使用,仅需要简单的配置即可满足常用需求。
Stack | Card-style Hugo theme designed for bloggers (jimmycai.com)
配置
Params
description
网站描述,在 footer 位置。
mainSections
点击首页上的Home按钮时跳转的页面,默认为 [“post”],即 http://host:port/post/
rssFullContent
是否支持 rss 协议,默认为 true
favicon
Hugo 的静态文件应放置在根目录的 static 下,static下的所有文件会全部复制到编译后的根目录下,访问 url 为:http://host:port/file_name.ext
i18n
|
|
ar: Arabicbn: Bengalica: Catalande: Germanel: Greeken: Englishes: Spanishfa: Persianfr: Frenchhu: Hungarianid: Indonesianit: Italianja: Japaneseko: Koreannl: Dutchpl: Polishpt-br: Portugueseru: Russianth: Thaitr: Turkishuk: Ukrainianzh-cn: Chinese (Simplified)zh-hk: Chinese (Traditional) (Hong Kong)zh-tw: Chinese (Traditional) (Taiwan)
Custom Menu
文件夹中创建 index.md 文件,头部添加
|
|
identifier: Item IDname: Display texturl: Linkweight: Priority of the item, lower value means higher priority.params:icon: 菜单使用的图标,在主题的assets/icons文件夹下。newTab: Open this link in new tab
自定义头/尾
layouts/partials/head/custom.htmllayouts/partials/footer/custom.html
可用配置:
|
|
Article
|
|
评论
|
|
provider:
cactuscusdisdisqusdisqusjsgiscusgitalkremark42twikooutterancesvssuewaline
插件
包括主页右侧的历史、搜索、分类、目录、标签云。可以配置插件是否显示和排列顺序。
详情见:Widgets | Stack (jimmycai.com)
写作
前言
用"—“包裹的 yaml 内容,配置当前页的部分属性。示例:
|
|
正文
正常的 Markdown 语法
参考
【1】Stack | Card-style Hugo theme designed for bloggers (jimmycai.com)