6.0 KiB
Maupassant
Maupassant theme, ported to Hugo.
- Preview: flysnow blog
- 中文文档
A simple Hugo template with great performance on different devices, ported from a Typecho theme by Cho, forked and modified from JokerQyou.
Preview
Features
Installation
cd <YOUR Bolg Root Dir>
git clone https://github.com/rujews/maupassant-hugo themes/maupassant
Configuration
Apply theme
theme = "maupassant"
Basic Configuration
baseURL = "http://www.flysnow.org"
languageCode = "zh-CN"
title = "飞雪无情的博客"
theme = "maupassant"
[author]
name = "飞雪无情"
[params]
author = "飞雪无情"
subtitle = "专注于Android、Java、Go语言(golang)、移动互联网、项目管理、软件架构"
keywords = "golang,go语言,go语言笔记,飞雪无情,java,android,博客,项目管理,python,软件架构,公众号,小程序"
description = "专注于IT互联网,包括但不限于Go语言(golang)、Java、Android、Python、项目管理、抖音分析、软件架构等"
Menus
[menu]
[[menu.main]]
identifier = "books"
name = "新书"
url = "/books/"
weight = 2
[[menu.main]]
identifier = "archives"
name = "归档"
url = "/archives/"
weight = 3
[[menu.main]]
identifier = "about"
name = "关于"
url = "/about/"
weight = 4
Friend Links
[[params.links]]
title = "Android Gradle权威指南"
name = "Android Gradle权威指南"
url = "http://yuedu.baidu.com/ebook/14a722970740be1e640e9a3e"
[[params.links]]
title = "常用开发工具CDN镜像"
name = "常用开发工具CDN镜像"
url = "http://mirrors.flysnow.org/"
TOC
TOC support in Front Matter .
toc = true
If the left blank space more than 100px, it will display Floating TOC. here is preview https://kkua.github.io/post/java-util-code-snippet/
Ads
[[params.ads]]
title = "领取¥1888阿里云产品通用代金券"
url = "https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=jdg9oj97"
[[params.ads]]
title = "领取¥1888阿里云产品通用代金券"
url = "https://promotion.aliyun.com/ntms/act/vmpt/aliyun-group/home.html?userCode=jdg9oj97"
img = "https://img.alicdn.com/tfs/TB17qJhXpzqK1RjSZFvXXcB7VXa-200-126.jpg"
[[params.ads]]
title = "领取¥1888阿里云产品通用代金券"
url = "https://promotion.aliyun.com/ntms/act/enterprise-discount.html?userCode=jdg9oj97"
img = "https://img.alicdn.com/tfs/TB1aDXhXpzqK1RjSZFvXXcB7VXa-259-194.jpg"
Ads Preview http://www.flysnow.org/
Google Analytics
googleAnalytics = "GA ID"
Custonm Summaries
Support Hugo Content Summaries <!--more-->。You can change summary length in config.toml config file.
# default is 70
summaryLength = 140
Disqus
disqusShortname = "yourdiscussshortname"
Page View Support
[params]
busuanzi = true
Draw Diagram
-
sequence diagram(powered by js-sequence)
-
global setting, add below config to
config.toml.[params.sequenceDiagrams] enable = true options = "" # default: "{theme: 'simple'}" -
Configure for an article itself only, add below config to
Front Matterof the article.sequenceDiagrams enable: true
Then set language identifier of code blocks as
sequence. For example```sequence Alice->Bob: Hello Bob, how are you? Note right of Bob: Bob thinks Bob-->Alice: I am good thanks! ``` -
-
flowchart diagram(powered by flowchart.js)
-
Global setting, add below config to
config.toml.[params.flowchartDiagrams] enable = true options = "" -
Configure for an article itself only, add below config to
Front Matterof the article.flowchartDiagrams: enable: true
Then set language identifier of code blocks as
flowchatorflow. For example```flow st=>start: Start op=>operation: Your Operation cond=>condition: Yes or No? e=>end st->op->cond cond(yes)->e cond(no)->op ``` -
-
graphviz(powered by viz.js)
It should be configured for an article itself only,add below config to
Front Matterof the article.graphviz: enable: trueThen set language identifier of code blocks as
viz-<engin>, engin parameter is the name of graphviz engin includingcirco、dot、fdp、neato、osage和twopi. For example```viz-dot digraph G { subgraph cluster_0 { style=filled; color=lightgrey; node [style=filled,color=white]; a0 -> a1 -> a2 -> a3; label = "process #1"; } subgraph cluster_1 { node [style=filled]; b0 -> b1 -> b2 -> b3; label = "process #2"; color=blue } start -> a0; start -> b0; a1 -> b3; b2 -> a3; a3 -> a0; a3 -> end; b3 -> end; start [shape=Mdiamond]; end [shape=Msquare]; } ```
Contributing
All kinds of contributions (enhancements, new features, documentation & code improvements, issues & bugs reporting) are welcome.
Looking forward to your pull request.
Maupassant on other platforms
- Typecho:https://github.com/pagecho/maupassant/
- Octopress:https://github.com/pagecho/mewpassant/
- Farbox:https://github.com/pagecho/Maupassant-farbox/
- Wordpress:https://github.com/iMuFeng/maupassant/
- Ghost: https://github.com/LjxPrime/maupassant/
- Hexo: https://github.com/tufu9441/maupassant-hexo
- Hugo: https://github.com/rujews/maupassant-hugo
