野狼匹的博客


  • 首页

  • 关于

  • 标签

  • 分类

  • 归档

test

发表于 2019-07-21 | 更新于: 2019-07-21 | 分类于 测试

加入图片

test

博客搭建笔记

发表于 2019-07-21 | 更新于: 2019-08-14 | 分类于 博客搭建

¶环境配置

git

Node.js

Hexo安装:npm install hexo -g

安装完成后检查:hexo -v

¶Hexo基本操作

初始化文件夹:hexo init

开启服务器:hexo s

Ctrl+C为退出服务器,开启服务器后在 http://localhost:4000/ 中预览博客

清除缓存:hexo clean

生成页面:hexo g

上传到github:hexo d

查看帮助:hexo help

查看版本:hexo version

新建文章:hexo new "name"

新建页面:hexo new page "name"

安装插件:npm install --save hexo-admin(插件名)

卸载插件:npm uninstall hexo-admin(插件名)

¶其他配置

ssh key

hexo主要配置文件:_config.yml

首次上传到github安装插件:npm install hexo-deployer-git --save

¶添加图片

npm install https://github.com/CodeFalling/hexo-asset-image --save

配置文件:post_asset_folder: true

坑点:图片链接要写"/",不要写"\"

¶踩坑

bash: hexo: command not found 解决方案:

添加环境变量:C:\Users\lenovo\AppData\Roaming\npm\node_modules\hexo\bin

¶hexo-renderer-markdown-it 插件

为了更好地写markdown文档

1
2
npm un hexo-renderer-marked --save
npm i hexo-renderer-markdown-it --save

添加到_config.yml文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Markdown-it config
## Docs: https://github.com/celsomiranda/hexo-renderer-markdown-it/wiki
markdown:
render:
html: true
xhtmlOut: false
breaks: true
linkify: true
typographer: true
quotes: '“”‘’'
plugins:
- markdown-it-abbr
- markdown-it-footnote
- markdown-it-ins
- markdown-it-sub
- markdown-it-sup
- markdown-it-emoji # add emoji
anchors:
level: 2
collisionSuffix: 'v'
permalink: true
permalinkClass: header-anchor
permalinkSymbol: ¶

地址:https://github.com/hexojs/hexo-renderer-markdown-it/wiki/Advanced-Configuration

第一个博客

发表于 2019-07-21 | 更新于: 2019-07-21 | 分类于 闲聊

第一个博客

欢迎大家来到我的博客。

12

野狼匹

13 日志
5 分类
6 标签
GitHub
Links
  • 百度
  • 谷歌
© 2019 野狼匹
本站访问数 人次 本站总访问量 次