Hugo 主题
Hugo 主题 Windy
用于 HUGO 的简单博客主题。
演示:https://zetton86.github.io/hugo_theme_windy/
屏幕截图
功能
- 响应式
- 黑暗
- 目录
- json-ld
- MathJax
入门
先决条件
- hugo extended >= v0.128.2
- Node.js
- 参考:通过包管理器安装 Node.js | Node.js
使用 exampleSite 创建站点
$ git clone https://github.com/zEttOn86/hugo_theme_windy.git
$ cd hugo_theme_windy
$ npm install
$ make dev
访问以下站点。
- https://#:1313/
使用此主题自定义站点
$ cd themes
$ git submodule add https://github.com/zEttOn86/hugo_theme_windy.git
$ cd ..
$ npm install themes/hugo_theme_windy
$ cp -r themes/hugo_theme_windy/static \
themes/hugo_theme_windy/assets \
themes/hugo_theme_windy/i18n \
themes/hugo_theme_windy/layouts \
themes/hugo_theme_windy/exampleSite/config \
.
编辑 config/_default/hugo.toml
中的 module.mounts
部分,以指定正确的 node_modules
目录。
示例
[[module.mounts]]
- source = '../node_modules/mathjax' # Must specify a proper directory for node_modules.
+ source = 'node_modules/mathjax'
target = 'assets/mathjax'
最后,运行以下命令以确认您的站点
hugo server
用法(配置)
基本配置
请编辑 config/_default/hugo.toml
以更改博客标题。
title = 'Hugo Theme Windy' # To change the blog title.
baseURL = 'https://example.org/' # To change the base address
copyright = "2024. zEttOn86 - All rights reserved."
languageCode = 'ja-JP'
defaultContentLanguage = "en"
hasCJKLanguage = true
enableInlineShortcodes = true
enableRobotsTXT = true
enableEmoji = true
enableGitInfo = true
theme = "hugo_theme_windy"
...
# Edit the following if you want to enable comment fields by Disqus.
[services]
[services.disqus]
shortname = 'your-disqus-shortname'
[services.googleAnalytics]
ID = 'G-MEASUREMENT_ID'
[privacy]
[privacy.googleAnalytics]
disable = true
...
其他配置
请检查以下文件。
config/_default/params.toml
config/_default/menus/
许可证
此代码在 Apache-2.0 许可下发布
此主题受 hugo-theme-tailwind 启发
作者
zEttOn86