■1 tDiaryでRuby(やYAML、XML)のコードに色をつける 思い出すのに時間がかかっちゃいました。基本的には、かずひこさんの日記を読んで、 syntaxを導入。rubyとyamlとxmlに色を付けられます。私の環境ではhikidoc.rbに要パッチ。CSSを適用させるために簡単なプラグインも書きました。 手順としては以下のような流れだった模様: syntaxをインストール syntaxライブラリをtDiaryに配置 (hikidoc.rbにパッチを適用) 色付け用のcssファイルを用意してサーバに配置 syntax_stylesheets.rbプラグインを用意 色を付けたいコードをsuper preっぽく書く 以下、順番に説明します。 1. syntaxをインストール どうやら私はgemでローカルにインストールしたらしい。たぶん、後述の色付け用のcssを使いたかったから。 ge