Hugo 主题
Black
- 作者: SunkenPotato
- GitHub Star: 1
- 更新日期: 2024-06-27
- 许可协议: MIT
- 标签: 暗黑
什么是 Black
?
Black 是一个
- 简洁的,
匿名的
,- 低调的
主题。
black
的设计理念是减少
通过移除不必要的元素来减少混乱,并通过最大化
文本和背景之间的对比度来提高可读性。
使用简单的、经过全球测试的字体,如 Inter 或 Geist Mono
,可以减少
你的眼睛的负担。
示例网站在这里
安装
您可以手动安装主题,方法是访问 https://github.com/SunkenPotato/black.git 并将文件复制到 themes/black
或者将其克隆到 themes/black
$ git clone https://github.com/SunkenPotato/black.git themes/black
如果你不想做任何大的改动,并且总是拥有最新的更新,你可以将其添加为一个子模块
$ git submodule add https://github.com/SunkenPotato/black.git themes/black
配置
配置非常简单。只需创建一个 config.toml
文件,并将以下文本粘贴到其中。记得根据你的喜好更改参数。
baseurl = "<your url>/<localhost>"
title = "<your title>"
languageCode = "en-US" # Not supported yet.
theme = "black"
[params]
frontimage = "<your image>" # The base image.
[menu]
[[menu.main]] # Example menu item
name = "Home" # Your menu text
url = "/" # The URL it points to
weight = 1 # The index of the menu item
[menu.main.params] # Optional.
disabled = false
简码
您可以使用所有默认的 Hugo 简码,如 {{<figure>}}
等。https://gohugo.com.cn/content-management/shortcodes/
间隔符
创建一个空 div,用于添加空间
使用示例
{{<spacer>}}
分隔线
创建一条横穿页面的水平线。用于分隔内容
参数
cl
设置分隔线的颜色,使用十六进制表示。(可选)
使用示例
{{<divider>}}
或者使用 cl
{{<divider cl="#ff0000">}}
网站图标
请查阅文档。
如何编辑主题
您不需要任何东西。直接开始编辑即可。
许可协议
版权所有 © 2024 SunkenPotato。此主题已在 MIT 许可证下发布。请查看原始主题许可证以获取更多信息。