Hexo update
Created|Updated|cms
codeblock の表現を柔軟に設定するために、Hexo をアップデートしてみました。
以下の構文で利用できます。開発者の皆さんに感謝です。
{% codeblock [title] [lang:language] [url] [link text] [line_number:(true|false)] [highlight:(true|false)] [first_line:number] %} |
Hexo のアップデート
$ sudo npm update hexo -g |
40 | highlight: |
動作確認
行番号なし
$ pwd |
行番号あり
1 | #include <stdio.h> |
行番号開始指定あり
10 | #include <stdio.h> |
Related Articles

2015-01-31
Octopress to Hexo
http://hexo.io/http://hexo.io/docs/https://github.com/wzpan/hexo-theme-freemind ブログをOctopress からHexo に変更してみました。 node.js のインストール$ sudo apt-get install build-essential libssl-dev curl git$ git clone git://github.com/creationix/nvm.git ~/.nvm$ source ~/.nvm/nvm.sh$ nvm install v0.10 ~/.bashrc[[ -s "$HOME/.nvm/nvm.sh" ]] && . "$HOME/.nvm/nvm.sh"nvm use v0.10 > /dev/nullexport NODE_PATH=${NVM_PATH}_modules Hexo のインストール$ npm install -g hexo$ hexo init h...

2015-02-05
Hexo Helper Shell Script
Hexo をGUI で支援するスクリプトをzenity で書いてみました。 シェルスクリプトコマンドラインでHEXO を操作できる環境が整っていることが前提です。 /PATH/TO/hexo-helper.sh#!/bin/bash[[ -s "$HOME/.nvm/nvm.sh" ]] && . "$HOME/.nvm/nvm.sh"nvm use v0.10 > /dev/nullexport NODE_PATH=${NVM_PATH}_modulesSOURCE_REPOSITORY=bitbucketif [ $# -lt 1 ] ; then zenity --error --text="Usage: hexo-helper.sh hexo_path" exit 1fiHEXODIR=$1if ! [ -d $HEXODIR ] ; then zenity --error --text="Bad directory." exit 1...

2023-12-09
Hexo Theme Butterfly
https://github.com/jerryc127/hexo-theme-butterfly モダンで多機能なHexo のテーマButterflyを使ってみました。あまりにも多機能なのでシンプルになるように設定しました。パッケージ版を導入して、オリジナルのスクリプトは修正しないようにしました。 環境 WSL(Ubuntu 22.04) on Windows 11 nodejs v20.10.0 npm 10.2.3 hexo 7.0.0 hexo-theme-butterfly 4.11.0 ソフトウェアのインストールHexoのインストールhttps://hexo.io/ npm install hexo-cli -ghexo init blogcd blognpm install Butterflyテーマのインストールhttps://github.com/jerryc127/hexo-theme-butterfly npm install hexo-theme-butterflynpm install hexo-renderer-pug hexo-renderer...
2020-02-27
hexo-related-popular-posts プラグイン
https://github.com/tea3/hexo-related-popular-postshexo-related-popular-posts プラグインは関連記事や人気の記事一覧を生成するHexo のプラグインです。freemind テーマで関連記事を表示してみました。Google Analytics API で収集した情報で人気の記事も表示してみました。 環境 WSL nodejs v13.9.0 npm 6.13.7 hexo 4.2.0 hexo-theme-freemind 構築 - 関連記事インストール hexo-related-popular-posts パッケージ $ npm install hexo-related-popular-posts --save ga-analytics の修正 コールバック関数関連のエラーを修正 ./node_modules/ga-analytics/module.js8889//fs.writeFile(sessionFile, JSON.stringify(result));f...
2019-06-26
Hexo Tag Google Charts
https://github.com/juampi92/hexo-tag-googlechartshttps://developers.google.com/chart/interactive/docs/galleryhexo-tag-googlecharts を使ってチャートを表示してみました。 Google Charts を直接Javascript から使うよりも簡単に利用できて便利です。カスタマイズに少しコツが必要なのでよく使う構成をテンプレートとして作っておくとよさそうです。 if (!window.google) { document.body.innerHTML = 'You need to include the script //google.com/jsapi on your template'; throw 'Google JS API is needed'; } else { (function() { google.load('visualization', '1.0', {'packages': ["cor...

2023-12-02
Hexo 7.0 + Freemind + Travel
https://hexo.io/news/2023/11/03/hexo-7-0-0-released/https://github.com/wzpan/hexo-theme-freemind/https://github.com/ktkr3d/hexo-theme-freemind-travel Hexo 7.0 がリリースされたので新規に環境を構築してみよう。FreemindテーマとTravelカラーテーマを設定します。 環境 WSL(Ubuntu 22.04) on Windows 11 nodejs v20.10.0 npm 10.2.3 hexo 7.0.0 構築 Hexo 7.0のインストールhttps://hexo.io/ npm install hexo-cli -ghexo init blogcd blognpm install Freemind テーマのインストールhttps://github.com/wzpan/hexo-theme-freemind git clone https://github.com/wzpan/hexo-theme-f...
Comments