hexoで使用中のpluginのメモ
はじめに
hexoには様々な拡張機能がプラグインとして提供されている。
その中から,今自分が使っているモノのリストとその使い方をメモしておく。
目次
インストール一覧
一覧というか,package.jsonを晒す。
1 | { |
“dependencies”に入っているのが,hexo関連。
以下に詳細を見ていく
インストール詳細
コア関連
取り合えず,何も考えずにぶち込んどけってやつ。
- hexo-generator-archive……「アーカイブの生成」
1 | archive_generator: |
hexo-generator-category……「カテゴリーページの生成」
hexo-generator-feed……「AtomまたはRSSのフィードを作成」
hexo-generator-index……「最初のindexページの生成」
hexo-toc……「ポストがレンダリングされる前に、マークダウンTOC(目次)を挿入します。」
hexo-generator-archive 1
2
3
4
5
6
7
8toc:
maxdepth: 3 #最大深度以下の見出しを使用する。
class: toc ♯tocのCSSクラス
slugify: transliteration #どのslugify関数を使用するかを選択します。現在、uslug(デフォルト)と音訳をサポートしています
anchor: # 見出しごとにアンカーが必要かどうか(Default is false)
position: after #アンカーは、タイトルの前またはタイトルの後ろに置く必要があります。 (Default is after);
symbol: '#' #どのシンボルをアンカーにしたいか(Default is #);
style: header-anchor #アンカーのCSSクラス、(Default is header-anchor);hexo-generator-seo-friendly-sitemap,……「googleエンジン用にサイトマップ(XML)を生成。投稿記事オプションにsitemap: falseを付けると,そのページは除外される」
hexo-generator-tag……「タグページの生成」
hexo-fs……「ファイルシステムモジュール」
hexo-i18n……「多言語対応のなめのi18nが使えるようになる」
hexo-renderer-ejs2……「テンプレートエンジンejs関連」
hexo-renderer-marked……「マークダウン用レンダラー」
hexo-imagemin……「画像のサイズを圧縮する」
hexo-imagemin 1
2
3
4
5
6
7imagemin:
enable : true //プラグインのon/off
interlaced : false //プログレシッブレタリングをするか
multipass : false //svgの最適化
optimizationLevel: 2 //最適化レベルを0~7で
pngquant : false //pngquantプラグインを使用するか(別途インストール必要?)
progressive: false //プログレッシブへの無損失変換hexo-notify……お知らせ用?
hexo-pagination……「ページネーション用プラグイン」
hexo-server……「ローカルで確認するためのサーバー機能」
取り合えず入れとけば動くもの
hexo-algoliasearch……「Webサイト用の検索ボックスalgoliaを使用できるようにする。当然algoliaアカウントが必要
hexo-autonofollow……「hexoの外部リンクをすべてnofollow属性を付加」
hexo-clean-css……「clean-cssのhexo版」
1
2
3clean_css:
exclude:
- *.min.csshexo-deployer-ftpsync……「FTPでサーバーと繋ぐ」
1
2
3
4
5
6
7
8
9
10deploy:
type: ftpsync
host: <host>
user: <user>
pass: <password>
remote: [remote]
port: [port]
ignore: [ignore]
connections: [connections]
verbose: [true|false]hexo-deployer-git……「gitにデプロイできるようにするプラグイン」
hexo-deployer-git languages:yml 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24deploy:
type: git
repo: <repository url>
branch: [branch]
message: [message]
name: [git user]
email: [git email]
extend_dirs: [extend directory]
ignore_hidden: false # default is true
# or this:
deploy:
type: git
message: [message]
repo:
github: <repository url>,[branch]
gitcafe: <repository url>,[branch]
extend_dirs:
- [extend directory]
- [another extend directory]
ignore_hidden:
public: false
[extend directory]: true
[another extend directory]: falsehexo-html-minifier……「HTMLMinifier。HTMLのサイズを縮小して読み込み速度UP」
投稿作成時に記述が必要なもの
- hexo-renderer-stylus……「NibというCSSライブラリを使えるようにする」
最後に
まだまだ使いこなせてないモノや便利なものがありそうなので,この記事は随時更新するかも。
兎に角迷ったらhexo公式のプラグインページへ
- hexo
- hexo-autonofollow
- hexo-browsersync
- hexo-clean-css
- hexo-deployer-ftpsync
- hexo-deployer-git
- hexo-filter-flowchart
- hexo-filter-sequence
- hexo-filter-sub
- hexo-filter-sup
- hexo-fs
- hexo-generator-archive
- hexo-generator-category
- hexo-generator-feed
- hexo-generator-index
- hexo-generator-seo-friendly-sitemap
- hexo-generator-tag
- hexo-html-minifier
- hexo-i18n
- hexo-imagemin
- hexo-notify
- hexo-pagination
- hexo-renderer-ejs2
- hexo-renderer-marked
- hexo-renderer-stylus
- hexo-server
- hexo-toc
- hexo-uglify
- hexo-util