[TOC]

jekyll vs hugo vs hexo

https://www.techiediaries.com/jekyll-hugo-hexo/

typora插件 key 解析

github部署后的相对路径 typora-copy-images-to: ffmpeg
typora软件中查看图片的根路径 typora-root-url: ../_posts

Hexo

Hexo update

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

1.全局升级hexo-cli
$hexo version
$npm install hexo-cli -g
$hexo version

2、安装npm-check, Check for outdated, incorrect, and unused dependencies.
# https://www.npmjs.com/package/npm-check
$npm install -g npm-check
$npm-check #检查系统中的插件是否有升级的

3、安装npm-upgrade, Interactive CLI utility to easily update outdated NPM dependencies with changelogs inspection support.
# https://www.npmjs.com/package/npm-upgrade
$npm install -g npm-upgrade
$npm-upgrade #升级系统中的插件

4、
$npm update -g
$npm update --save


found 475 vulnerabilities (350 low, 1 moderate, 124 high)
run `npm audit fix` to fix them, or `npm audit` for details

Refer:

https://lanvnal.com/2020/02/16/hexo-ban-ben-sheng-ji/
What is the –save option for npm install?

https://hexo.io/docs/

https://blog.peiyingchi.com/2017/03/11/hexo-user-notes/

https://zhuanlan.zhihu.com/p/26877716

https://linlif.github.io/2017/05/27/Hexo%E4%BD%BF%E7%94%A8%E6%94%BB%E7%95%A5-%E6%B7%BB%E5%8A%A0%E5%88%86%E7%B1%BB%E5%8F%8A%E6%A0%87%E7%AD%BE/

https://blog.csdn.net/Likianta/article/details/78943573

https://lanjingling.github.io/2015/09/24/use-of-hexo-2/

https://blog.csdn.net/kunkun5love/article/details/79130956

http://theme-next.iissnan.com/theme-settings.html#categories-page

Hexo常见问题解决方案

https://xuanwo.io/2014/08/14/hexo-usual-problem/

Your site _config.yml (Optional):

Your theme _config.yml (Optional):

theme-next

https://github.com/theme-next/hexo-theme-next

https://github.com/theme-next/hexo-theme-next/blob/master/docs/INSTALLATION.md

blog style

https://github.com/iissnan/hexo-theme-next/issues/119

https://blog.csdn.net/dataiyangu/article/details/85057957

https://www.oncecoupled.com/sidebar-show-mobile/

https://io-oi.me/tech/hexo-next-optimization.html

enable sidebar on mobile移动设备上开启侧栏

https://github.com/iissnan/hexo-theme-next/pull/1717

1
2
3
4
5
6
7
$ cd hexo
$ ls
_config.yml node_modules package.json public scaffolds source themes

~/blog/themes on  master! ⌚ 16:59:21
$ ls
landscape next next-reloaded

[yaml]~/blog/_config.yml

1
2
3
##Themes: https://hexo.io/themes/

theme: next-reloaded

Set theme in main Hexo root config _config.yml file:

1
theme: next

移动端显示 back-to-top 按钮和侧栏

文件位置:~/blog/themes/next/_config.yml

1
`# Enable sidebar on narrow viewonmobile: true`
1
2
3
4
5
6
7
8
9
10
find . -name "*config.yml" -type f
./next/_config.yml

./node_modules/hexo/node_modules/hexo-cli/assets/_config.yml
./node_modules/hexo/node_modules/hexo-cli/assets/themes/landscape/_config.yml

./_config.yml
./themes/next/_config.yml
./themes/next-reloaded/_config.yml
./themes/landscape/_config.yml

hexo images 统一的图片存放地

https://hexo.io/docs/asset-folders.html

Global Asset Folder

Assets are non-post files in the source folder, such as images, CSS or JavaScript files. For instance, If you are only going to have a few images in the Hexo project, then the easiest way is to keep them in a source/images directory. Then, you can access them using something like ![](/images/image.jpg)

插件地址

https://hexo.io/plugins/index.html

  • hexo-filter-plantuml

    Generate PlantUML Diagram with markdown code fence

  • hexo-filter-sequence

    Generate UML sequence diagrams for Hexo.

  • hexo-tag-plantuml

    hexo-tag-plantuml is a tag plugin for Hexo. It can work with plantuml to draw uml.

插件的安装

npm install -g hexo-cli

npm install hexo-deployer-git –save

npm install hexo-generator-feed

npm install hexo-generator-sitemap

npm install hexo-generator-sitemap –save

npm install hexo-generator-feed –save

npm install hexo-generator-baidu-sitemap –save

npm install hexo-browsersync –save

npm install –save-dev hexo-typora-image

1
[npm install --save hexo-filter-flowchart](https://www.npmjs.com/package/hexo-filter-flowchart)

hexo install:

$ npm install -g hexo-cli
#test

$ hexo

config your blog: https://hexo.io/docs/configuration.html
_config.yml

language: zh-CN
timezone: Asia/Shanghai
note: Asia\Shanghai cause error: TypeError: Cannot read property ‘offset’ of null
generate blog: https://hexo.io/docs/commands.html

Deployment

Hexo provides a fast and easy deployment strategy. You only need one single command to deploy your site to your servers.
$ hexo deploy
Before your first deployment, you will have to modify some settings in _config.yml. A valid deployment setting must have a type field. For example:
Git
Install hexo-deployer-git.
$ npm install hexo-deployer-git –save
Edit settings.
deploy:
type: git
repo: git@github.com:cuiwm/cuiwm.github.io.git #
branch: master
message: [message]

同时托管到github和coding
hexo干货系列:(四)将hexo博客同时托管到github和coding

image-20180801151622486

configure domain

configure your domain dns setting in your dns isp site
$ echo “91kuaile.cn” > source/CNAME
reference:

$npm install hexo-generator-feed
$npm install hexo-generator-sitemap
#插件
插件是配置是在hexo 目录下的_config.yml ,不是theme下的next下的_config.yml

Extensions

Plugins:

  • hexo-generator-feed

  • hexo-generator-sitemap

    Feed Atom

    feed:
    type: atom
    path: atom.xml
    limit: 20

    sitemap

    sitemap:
    path: sitemap.xml

Reference:

$ hexo new page “tags”
INFO Created: ~/blog/source/tags/index.md

$ hexo new draft “My First Blog Post”
creates -> ./source/_drafts/My-First-Blog-Post.md

The stuff between the dashes — at the top of the markdown file is called “front-matter”. It is metadata that is used by Hexo and the active theme. See the Hexo documentation on Front-Matter for more information.
Ensure that your Markdown content for the page sits BELOW the front-matter dashes — or the content will not display (and you’ll likely see a YAMLException error in the server output).

Saving changes to your Markdown files will be automatically detected by the running hexo server and regenerated as static HTML files, but you must refresh the browser to view the changes.

If you dislike having to manually refresh the browser each time, the hexo-livereload or hexo-browsersync plugins can do it automatically.

To install the hexo-browsersync plugin (my personal favorite):

$ npm install hexo-browsersync –save

$ hexo server –draft –open # restart the server

阅读全文 »

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment