最近在https://www.linpx.com/上看到了博主的博客主题,感觉很漂亮,不过是Typecho 主题的。于是便用了周末的时间将它转成了Hugo的。 主题地址在:https://github.com/mjyi/Gemini
Pinghsu Theme
链接地址:https://github.com/chakhsu/pinghsu.
作者主页:https://www.linpx.com/.
响应式设计,对于移动设备也有良好的体验。
截图
首页
内容页
归档页面
支持功能
- 首页分页显示
- 分类
- 标签
- 归档
- 文章目录【TOC】
- 评论支持网易云跟帖,Disqus.
- Google Analytics
- 代码高亮
- 文章分享
使用主题
安装Hugo
- 安装Hugo,Mac用户可以使用Homebrew 安装:
$ brew install hugo
其他平台下载地址:Hugo Releases
关于使用方法详见:
下载主题
使用Gemini主题,下载或者使用git clone
主题,放到 Hugo站点的themes目录下。
cd ~/yoursite
git clone https://github.com/mjyi/Gemini.git themes/Gemini
配置文件
参考 exampleSite/config.toml
,如下:
baseurl = "https://mjyi.github.io/Gemini/"
title = "Hugo Theme Gemini"
canonifyurls = true
paginate = 3
languageCode = "en-us"
MetaDataFormat = "yaml"
theme = "Gemini"
googleAnalytics = "" # Google 统计
disqusShortname = "" #Disqus评论。
[params]
Keywords = ""
Author = "Gemini"
cloudTieKey = "" #优先使用网易云跟帖
recentPostCount = 7 #底部显示最新发表的文章数量
intro = ["I am a iOS Developer", "Work in Hangzhou"] #Footer个人介绍。
# 底部的社交信息
[[params.social]]
title = "Email"
url = "mailto:[email protected]"
[[params.social]]
title = "Github"
url = "https://github.com/mjyi"
[[params.social]]
title = "RSS"
url = ""
[[menu.main]]
name = "Archives"
url = "/post/"
weight = -200
[[menu.main]]
name = "Tags"
url = "/tags/"
weight = -180
[[menu.main]]
name = "About"
url = "/about"
weight = -160
关于单个文章的一些设置
+++
tags = ""
categories = ""
image = "/images/thumbs/0.jpg" #set a picture, or randomly select one in the folder images/thumbs
draft = true
comments = true
toc = true
author = ""
author_url = ""
+++
tags
:文章标签。categories
:文章分类image
:首页文章背景,不设置将从/images/thumbs 内的9张中随机选择一张。comments
:是否显示评论。toc
: 是否文章目录。author
,author_url
:作者信息,显示于文章底部。不设置则使用Site.Params.Authordraft
:是否是草稿,hugo默认不编译草稿,可使用hugo server --buildDrafts
调试。
最后
欢迎使用Gemini主题,有任何问题或者意见,欢迎留言反馈。