Amrta测试博客

hexo

这是第一次使用hexo搭建静态博客的测试文章
我的地址:https://Aquarian-Age.github.io/

hexo转hugo

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
tar xvf hugo_0.84.3_Linux-64bit.tar.gz 
sudo mv hugo /usr/local/bin/
hugo version
cd ~/
hugo new site blog
cd blog/

git clone https://github.com/flysnow-org/maupassant-hugo themes/maupassant
cp exampleSite/config.toml ../../

rm -r themes/maupassant/.git/ #避免添加git子项

hugo new post/Amrta测试博客.md

git init
git remote add origin https://github.com/Aquarian-Age/Aquarian-Age.github.io.git
git checkout -b hugo

hugo server -D
hugo server --theme=maupassant --buildDrafts --baseUrl="https://aquarian-age.github.io/"

可以直接在 blog/content/post/里面添加xx.md文件

1
2
3
4
5
hugo
git status
git add .
git commit -m "hugo test"
git push --set-upstream origin hugo

themes/maupassant/static/css/ 添加 toc_style.css

1
2
3
4
5
6
7
.post-toc {
transition: all .3s ease;
}

.post-toc:hover,.post-toc:active {
width: 200px !important;
}

hugo转hexo

1
2
3
4
5
6
7
8
9
10
11
12
13
14
sudo npm install -g hexo-cli
sudo npm install -g hexo
hexo init Blog
cd Blog/
cp -ax ../hexoBlog/themes/cafe/ .themes/
npm install
npm install hexo-deployer-git --save
npm install hexo-migrator-rss --save
npm install hexo-generator-feed --save
cp -ax ~/blog/content/post/* source/_posts/
hexo server

git config --global init.defaultBranch hexo
hexo g -d