博客从wordpress迁移至hugo
缘由是感觉wordpress 太卡了,1C1H的服务器使用后台时反应慢所以就换纯静态的了,之前用过hexo,现在感觉hugo不错
操作
./hugo new site ./blog
mv ./wp-hugo.zip ./blog
cd ./blog/themes
git clone https://github.com/rujews/maupassant-hugo.git
cd ../
vi config.toml
主题:https://github.com/flysnow-org/maupassant-hugo
config
baseURL = "https://blog.kquark.com"
languageCode = "zh-cn"
title = "Kquark blog"
hasCJKLanguage = true # 中日韩语言支持
theme = "maupassant-hugo" # 主题名称,与themes目录下名称一致
enableRobotsTXT = true # 爬虫支持
PaginatePath = "page" # 分页
summaryLength = 140 # 摘要显示字数
#googleAnalytics = "UA-110008600-0"
[author]
name = "Kquark"
[params]
subtitle = "一个 个人网站"
description = "奇技淫巧和技术分享" # 在页面meta属性里
keywords = "python,rust,linux,vps,服务器,机器学习,robot,AI" # 在页面meta属性里
toc = true # 支持文章大纲
#busuanzi = true
#registerInfo = "粤ICP备18000000号-1"
related = true
#googleAd = "ca-pub-300057030000200"
[[menu.main]] # 菜单栏,这里是关于页
identifier = "archives"
name = "存档"
url = "/archives/"
weight = 3
[[menu.main]] # 菜单栏,这里是关于页
identifier = "about"
name = "关于"
url = "/about/"
weight = 4
[markup]
[markup.highlight]
lineNos = true
style = "github"
[params.cc]
name = "知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议"
link = "https://creativecommons.org/licenses/by-nc-nd/4.0/"
cd public
git init
git remote add origin [email protected]:00000/0000.github.io.git
git add .
git commit -m 'init'
git push -f --set-upstream origin master