Hook

一个用于 Zola 的简洁个人网站/博客主题。

Demo

安装

将此仓库克隆到你的 themes 目录:

cd themes
git clone https://github.com/InputUsername/zola-hook.git hook

然后在 config.toml 中启用:

theme = "hook"

功能

内置以下模板:

模板包含以下 Tera blocks:

你可以在 front matter 中用 description 设置 section 或页面描述。 默认会使用 config.toml 中的 description

你可以在 config.toml 中定义首页头部链接:

[extra]

links = [
    { title = "Link display text", href = "http://example.com" },
    # ...
]

根分区中的页面可设置 extra.in_header = true,将其加入首页头部链接。

如果根 _index.md 存在,其内容会显示在首页中。

其下方会显示最近 20 篇文章列表。为此需要存在 blog/_index.md 分区 (若不存在会报错)。同时还会提供按年份归档的文章列表链接。

Hook 支持根据用户偏好自动切换浅色/深色模式,也提供手动切换按钮 (需要 JavaScript)。

截图

首页

Homepage

博客文章

Blog post

博客归档

Blog archive

深色模式

Dark mode

许可证

MIT 许可证,详见 LICENSE