Hugo 主题
一个简单的极简深色 Hugo 主题。
功能
- 响应式极简设计
- 可配置的主题颜色(带有自定义 css 文件)
- 使用内置 Chroma 进行语法高亮
- 支持 OpenGraph、Twitter 卡片
- Mastodon 验证
- Fediverse 创建者标签
- Disqus 评论支持
- Utterances 评论支持
- Google Analytics
- 可配置的帖子分页
- 延迟加载菜单
- 自定义 404 页面
安装
$ mkdir themes
$ cd themes
$ git clone https://github.com/gyorb/hugo-dusk
配置
示例配置
baseurl = "/"
title = "My site."
copyright = "Copyright (c) 2017, all rights reserved."
canonifyurls = true
languageCode = "en-US"
paginate = 3
theme = "hugo-dusk"
googleAnalytics = ""
disqusShortname = ""
[params.author]
name = ""
SectionPagesMenu = "main"
# Configure syntax highlight
[markup]
[markup.highlight]
style = "gruvbox" # dark themes: monokai, api, fruity, native, rrt, swapoff ... https://xyproto.github.io/splash/docs/longer/all.html
[[menu.main]]
name = "Posts"
weight = -120
identifier = "post"
url = "/post/"
[[menu.main]]
name = "Tags"
weight = -110
identifier = "tag"
url = "/tags/"
[params.meta]
keywords = "blog, tech"
description = "Personal blog."
[params.meta.fediverse]
creator = "@[email protected]" # https://blog.joinmastodon.org/2024/07/highlighting-journalism-on-mastodon/
[params]
github = "github id"
gitlab = "gitlab id"
twitter = "twitter id"
linkedin = "linkedin id"
email = "myemail"
theme_colors = "default-dark" # uses color css file under static/css/default-dark.css
utterancesRepo="REPO_NAME" # Utterances is enabled when this param is set
utterancesTheme="github-dark" # Default: github-dark
utterancesIssueTerm="pathname" # Default: pathname
[params.mastodon] # https://joinmastodon.org/verification
username = "username"
server = "https://example.com"