Hexo Tutorial
Hexo
Installation
Hexo
Hexo Docs
nvm-sh
Resolving EACCES permissions errors when installing packages globally
Downloading and installing Node.js and npm
Install npm manager
nvm is a version manager for node.js, designed to be installed per-user, and invoked per-shell.
1 | wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash |
Copy and paste the following code to your profile file
1 | export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" |
Load .zshrc into system
1 | source ~/.zshrc |
To verify that nvm has been installed, do:
1 | command -v nvm |
Install npm
1 | nvm install node |
Update
Check hexo version
1 | hexo version |
Update hexo-cli
1 | npm i hexo-cli -g |
NexT
Hexo
Categories & Tags
Tags: 单纯给文章打标签, 没有顺序和层级.
Categories: 可以用来将文章分类, 拥有层级.
tags:
- tag_1
- tag_2
categories: 同级标签
- [category_1]
- [category_2]
categories: 父级标签
- category_A
- category_a
categories: 同级标签 & 父级标签
- [category_A, category_a]
- [category_B, category_b]
top_img: source/img/post/Markdown-Tutor-bg.jpg
toc_number: true # or false
layout: slides # 默认关
slide:
theme: night
separator: ===
separator_vertical: ==
top: true # 文章置顶
Music Player
Usage
1 | {% aplayer title author url [picture_url, narrow, autoplay, width:xxx, lrc:xxx] %} |
Optiontitle
: music titleauthor
: music authorurl
: music file urlpicture_url
: optional, music picture urlnarrow
: optional, narrow styleautoplay
: optional, autoplay music, not supported by mobile browserswidth
:xxx: optional, prefix width:, player’s width (default: 100%)lrc
:xxx: optional, prefix lrc:, LRC file url
Example
1 | {% aplayer "穏ヤカナ眠リ" "岡部啓一" "/music/穏ヤカナ眠リ - 岡部啓一.m4a" "https://raw.githubusercontent.com/ZacksAmber/PicGo/master/img/20191017171342.png" "narrow" "autoplay" %} |
1 | {% aplayer "穏ヤカナ眠リ" "岡部啓一" "/music/穏ヤカナ眠リ - 岡部啓一.m4a" "https://raw.githubusercontent.com/ZacksAmber/PicGo/master/img/20191017171342.png" %} |
Usage
1 | pdf.js |
Example
1 | {% pdf https://example.com/sample.pdf %} |
隐藏文章
https://github.com/printempw/hexo-hide-posts