# 常用命令
- Hexo 命令(官网)
- 写博客
- hexo new "文件名"
- 运行
- hexo clean
- hexo g
- hexo server
- hexo d
- 运行(升级版)
- 跑起来:hexo clean && hexo g && hexo server
- 推上去:hexo clean && hexo g && hexo d
- 写博客
- git 命令(平时 hexo d 就够了)
- git add .
- git commit -m ""
- git push
# 配置
- 把内容 git clone 下来,
git clone git@github.com:Sneexy/WebsiteContent.git
- 在项目文件夹
WebsiteContent
下把 shoka(hexo-theme-shoka)拉下来,文件夹名字改为 shoka npm i hexo-renderer-multi-markdown-it --save --ignore-scripts
npm install
环境整坏了时:
- 卸载 nodejs:brew mac 卸载 nodejs - CSDN
- 重装 nodejs(for npm):mac 通过 HomeBrew 安装 node.js(自带 npm 包管理器)
修改配置:
在_config.shoka.yml 中
# 添加包依赖
不知道版本:
npm install 包名
知道版本
package.json
的dependencies
里按格式添加npm install
# 使用效果
Hexo 主题 Shoka & multi-markdown-it 渲染器使用说明
# 添加友链
在
source/friends
文件夹的_data.yml
里按照以下格式(项介绍)- site: #站点名称
owner: #管理员名字
url: #站点网址
desc: #简短描述
image: #一张图片
color: #颜色代码
在
source/friends
文件夹的index.md
里适当地方写上{% linksfile friends/_data.yml %}
。
# 隐藏文字
功能介绍
使用格式(感叹号和文字间不要有空格)(本地不能查看,需要渲染后网站上看)
!!黑幕黑幕黑幕黑幕黑幕黑幕!!: 鼠标滑过显示内容
!!模糊模糊模糊模糊模糊模糊!!{.bulr} : 选中文字显示内容
# 注释
[//]: # (哈哈我是注释,不会在浏览器中显示。) | |
[^_^]: # (哈哈我是注释,不会在浏览器中显示。) | |
[^_^]: | |
commentted-out contents | |
should be shift to right by four spaces (`>>`). |
注意:这句代码前面要空行。支持多行注释,括号中不要空行