Skip to content

Commit

Permalink
init blog structure
Browse files Browse the repository at this point in the history
  • Loading branch information
wweir committed Jan 16, 2018
0 parents commit 4e19315
Show file tree
Hide file tree
Showing 8 changed files with 228 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/public

.DS_Store
._*
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "themes/even"]
path = themes/even
url = https://github.com/olOwOlo/hugo-theme-even.git
35 changes: 35 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# personal hugo commands set
OS_TYPE = $(shell uname -s)
new =

default:
ifeq ("${new}", "")
@$(MAKE) server
else
@$(MAKE) new new="${new}"
endif

server:
ifeq ("${OS_TYPE}", "Darwin")
open http://localhost:1313 &>/dev/null
endif
ifeq ("${OS_TYPE}", "Linux")
xdg-open http://localhost:1313 &>/dev/null
endif

hugo server --disableFastRender --buildDrafts

new:
ifeq ("${new}", "")
@echo please set a TITLE for new article
@exit 1
endif

hugo new "post/${new}.md"

ifeq ("${OS_TYPE}", "Darwin")
open -a Typora "content/post/${new}.md"
endif

build:
hugo --cleanDestinationDir --gc
8 changes: 8 additions & 0 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
lastmod: {{ .Date }}
draft: true
tags: []
categories: []
---
130 changes: 130 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
baseURL = "http://wweir.cc/"
languageCode = "zh"
defaultContentLanguage = "zh"
title = "温习江湖"
enableRobotsTXT = true
enableEmoji = true
theme = "even"

hasCJKLanguage = true # has chinese/japanese/korean ? # 自动检测是否包含 中文\日文\韩文
paginate = 5 # 首页每页显示的文章数
disqusShortname = "wweir-cc" # disqus_shortname
googleAnalytics = "" # UA-XXXXXXXX-X
copyright = "" # default: author.name ↓ # 默认为下面配置的author.name ↓

[author] # essential # 必需
name = "wweir"

[sitemap] # essential # 必需
changefreq = "weekly"
priority = 0.5
filename = "sitemap.xml"

[[menu.main]] # config your menu # 配置目录
name = "Home"
weight = 10
identifier = "home"
url = "/"
[[menu.main]]
name = "Archives"
weight = 20
identifier = "archives"
url = "/post/"
[[menu.main]]
name = "Tags"
weight = 30
identifier = "tags"
url = "/tags/"
[[menu.main]]
name = "Categories"
weight = 40
identifier = "categories"
url = "/categories/"

[params]
debug = false # If true, load `eruda.min.js`. See https://github.com/liriliri/eruda

since = "2018-01-10" # Site creation time # 站点建立时间

# site info (optional) # 站点信息(可选,不需要的可以直接注释掉)
logoTitle = "温习江湖" # default: the title value # 默认值: 上面设置的title值
description = "wweir's blog"

# paginate of archives, tags and categories # 归档、标签、分类每页显示的文章数目,建议修改为一个较大的值
archive-paginate = 12

# The date format to use; for a list of valid formats, see https://gohugo.io/functions/format/
dateFormatToUse = "2006-01-02 15:04"

# show word count and read time ? # 是否显示字数统计与阅读时间
moreMeta = true

# 一些全局开关,你也可以在每一篇内容的 front matter 中针对单篇内容关闭或开启某些功能,在 archetypes/default.md 查看更多信息。
# Some global options, you can also close or open something in front matter for a single post, see more information from `archetypes/default.md`.
toc = true # 是否开启目录
autoCollapseToc = false # Auto expand and collapse toc # 目录自动展开/折叠
fancybox = true # see https://github.com/fancyapps/fancybox # 是否启用fancybox(图片可点击)
bootcdn = false # In china. @Deprecated: use [params.publicCDN] # 是否使用bootcdn(@Deprecated: 请使用[params.publicCDN])
mathjax = false # see https://www.mathjax.org/ # 是否使用mathjax(数学公式)
linkToMarkDown = false # if you config contentCopyright and hugo output .md files. # 是否在链接到markdown原始文件(如果你配置了下面的许可协议并允许hugo生成markdown文件)

contentCopyright = '<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a>'

changyanAppid = "" # Changyan app id # 畅言
changyanAppkey = "" # Changyan app key
livereUID = "" # LiveRe UID # 来必力
baidu_push = false # baidu push # 百度
baidu_analytics = "" # Baidu Analytics
baidu_verification = "" # Baidu Verification
google_verification = "" # Google_Verification # 谷歌

[params.publicCDN] # load these files from public cdn # 启用公共CDN,需自行定义
enable = false
jquery = '<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>'
slideout = '<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/slideout.min.js" integrity="sha256-t+zJ/g8/KXIJMjSVQdnibt4dlaDxc9zXr/9oNPeWqdg=" crossorigin="anonymous"></script>'
fancyboxJs = '<script src="https://cdn.jsdelivr.net/npm/@fancyapps/[email protected]/dist/jquery.fancybox.min.js" integrity="sha256-XVLffZaxoWfGUEbdzuLi7pwaUJv1cecsQJQqGLe7axY=" crossorigin="anonymous"></script>'
fancyboxCss = '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/[email protected]/dist/jquery.fancybox.min.css" integrity="sha256-7TyXnr2YU040zfSP+rEcz29ggW4j56/ujTPwjMzyqFY=" crossorigin="anonymous">'

[params.busuanzi] # count web traffic by busuanzi # 是否使用不蒜子统计站点访问量
enable = true
siteUV = true
sitePV = true
pagePV = true

[params.reward] # 文章打赏
enable = false
wechat = "/wechat-qr-code.png" # 微信二维码
alipay = "/alipay-qr-code.jpg" # 支付宝二维码

[params.social] # 社交链接
a-email = "mailto:[email protected]"
b-stack-overflow = "https://stackoverflow.com/users/5540725/wweir"
# c-twitter = "http://localhost:1313"
# d-facebook = "http://localhost:1313"
# e-linkedin = "http://localhost:1313"
# f-google = "http://localhost:1313"
g-github = "https://github.com/wweir"
# h-weibo = "http://localhost:1313"
i-zhihu = "https://www.zhihu.com/people/wweir"
j-douban = "https://www.douban.com/people/wweir26/"
# k-pocket = "http://localhost:1313"
# l-tumblr = "http://localhost:1313"
# m-instagram = "http://localhost:1313"

# 将下面这段配置取消注释可以使 hugo 生成 .md 文件
# Uncomment these options to make hugo output .md files.
#[mediaTypes]
# [mediaTypes."text/plain"]
# suffix = "md"
#
#[outputFormats.MarkDown]
# mediaType = "text/plain"
# isPlainText = true
# isHTML = false
#
#[outputs]
# home = ["HTML", "RSS"]
# page = ["HTML", "MarkDown"]
# section = ["HTML", "RSS"]
# taxonomy = ["HTML", "RSS"]
# taxonomyTerm = ["HTML"]
47 changes: 47 additions & 0 deletions data/even/default.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
archive = "归档"
tags = "标签"
categories = "分类"

[footer]
powered = "由 %s 强力驱动"
theme = "主题"

[posts]
prev = "上一页"
next = "下一页"
prev_post = "上一篇"
next_post = "下一篇"
toc = "文章目录"
readmore = "阅读更多"
reward = "赞赏支持"
rewardAlipay = "支付宝打赏"
rewardWechat = "微信打赏"
seeMarkDown = "查看本文 Markdown 版本 »"

[posts.header]
wordCount = "约 %d 字"
readingTime = "预计阅读 %d 分钟"

[copyright]
author = "文章作者"
lastMod = "上次更新"
markdown = "原始文档"
license = "许可协议"

[counter]
[counter.archives]
zero = "暂无文章"
other = "共计 %d 篇文章"

[counter.tagcloud]
zero = "暂无标签"
other = "共计 %d 个标签"

[counter.categories]
zero = "暂无分类"
other = "共计 %d 个分类"

[traffic]
siteUV = "本站总访客数 %s 人"
sitePV = "本站总访问量 %s 次"
pagePV = "%s 次阅读"
Binary file added static/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions themes/even
Submodule even added at 6f7bd1

0 comments on commit 4e19315

Please sign in to comment.