{% extends '_layout.swig' %} {% import '_macro/post-collapse.swig' as post_template with context %} {% import '_macro/sidebar.swig' as sidebar_template with context %}
{% block title %}{{ __('title.category') }}: {{ page.category }} | {{ title }}{% endblock %}
note: # Note tag style values: # - simple bs-callout old alert style. Default. # - modern bs-callout new (v2-v3) alert style. # - flat flat callout style with background, like on Mozilla or StackOverflow. # - disabled disable all CSS styles import of note tag. style:simple icons:true#false时PC端不显示图标,但移动端仍会显示,故需要在标签语句中手动no-icon进行标注 border_radius:3 # Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6). # Offset also applied to label tag variables. This option can work with disabled note tag. light_bg_offset:0
执行模板
1 2 3 4 5 6 7
note.js {% note [class] [no-icon] %} Any content (support inline tags too.io). {% endnote %} [class] : default | primary | success | info | warning | danger. [no-icon] : Disable icon in note. All parameters are optional.
Unique name : Unique name of tabs block tag without comma. Will be used in #id's as prefix for each tab with their index numbers. If there are whitespaces in name, for generate #id all whitespaces will replaced by dashes. Only for current url of post/page must be unique! [index] : Index number of active tab. If not specified, first tab (1) will be selected. If index is -1, no tab will be selected. It's will be something like spoiler. Optional parameter. [Tab caption] : Caption of current tab. If not caption specified, unique name with tab index suffix will be used as caption of tab. If not caption specified, but specified icon, caption will empty. Optional parameter. [@icon] : FontAwesome icon name (without 'fa-' at the begining). Can be specified with or without space; e.g. 'Tab caption @icon' similar to 'Tab caption@icon'. Optional parameter.
example
1 2 3 4 5 6 7 8 9 10 11
{% tabs First unique name %} <!-- tab --> **This is Tab 1.** <!-- endtab --> <!-- tab --> **This is Tab 2.** <!-- endtab --> <!-- tab --> **This is Tab 3.** <!-- endtab --> {% endtabs %}
pdf.js {% pdf url [height] %} [url] : Relative path to PDF file. [height] : Optional. Height of the PDF display element, e.g. 800px.
example
1
{% pdf https://example.com/sample.pdf %}
hexo video用法
执行模板
1 2
video.js {% video url %}
example
1 2
{% video /path/to/your/video.mp4 %} {% video https://example.com/sample.mp4 %}
hexo Group-pictures用法
执行模板
1 2 3 4 5
group-pictures.js {% grouppicture [group]-[layout] %}{% endgrouppicture %} {% gp [group]-[layout] %}{% endgp %} [group] : Total number of pictures to add in the group. [layout] : Default picture under the group to show.
nvm // 提示相关命令 nvm ls // 查看已安装node版本 nvm install XX // 安装XX版本的node nvm uninstall XX // 卸载XX版本的node nvm use XX // 切换到XX版本 nvm current // 显示当前版本 nvm ls available // 查看运程线上所有版本 nvm root // 查看nvm安装路径 nvm proxy // 查看设置与代理
常见问题
nvm use 切换环境无效
切换到管理员权限
node 在nvm之前安装,切换无效,需要卸载后使用nvm安装(npm ls -g –depth=0)