hexo
使用
务必注意mk需要加入title,否则会解析失败
---
title: 金融知识
date: 2022-08-05 01:31:08
tags:
- 金融知识
categories:
- 公司学习
---
# 初始化
npm install -g hexo-cli
hexo init <folder>
cd <folder>
npm install
hexo algolia
hexo d -g
云主题:https://github.com/YunYouJun/hexo-theme-yun
hexo g 生成
hexo d 部署
nginx
git权限
https://blog.csdn.net/Dawson_/article/details/105953403
服务器部署
还是用jenkins吧
yum install git
adduser git
# 修改用户权限
chmod 740 /etc/sudoers
vi /etc/sudoers
## 添加
git ALL=(ALL) ALL
chmod 400 /etc/sudoers
# git用户的密码
sudo passwd git
# .ssh
su git
cd ~
mkdir .ssh
cd .ssh
ssh-keygen # id_rsa 和 id_rsa.pub
cp id_rsa.pub authorized_keys
chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.ssh
# cmd
ssh -v git@ip
# linux
cd ~
git init --bare blog.git
#
vi ~/blog.git/hooks/post-receive
git --work-tree=/home/www/website --git-dir=/home/git/blog.git checkout -f
#
chmod +x ~/blog.git/hooks/post-receive
# windows
cd Blog
hexo init
npm install hexo-deployer-git --save
npm install hexo-server
hexo g
hexo s
# hexo的目录下,找到_config.yml
deploy:
type: git
repo: git@这里改为服务器公网IP:/home/git/blog.git
branch: master
message:
乱码
node_modules\hexo-prism-plugin\src\index.js
const map = {
''': '\'',
'&': '&',
'>': '>',
'<': '<',
'"': '"',
'{': '{',
'|': '|',
'}': '}'
};
halo
官网: