ソフトウェア/pukiwiki/gist.inc.php のバックアップ差分(No.1)
更新- バックアップ一覧
- 現在との差分 を表示
- ソース を表示
- バックアップ を表示
- ソフトウェア/pukiwiki/gist.inc.php へ行く。
- 1
- 追加された行はこの色です。
- 削除された行はこの色です。
[[公開メモ]] * gist のコードを貼り込めるようにした [#kc900d47] していたのに公開し忘れてた。 https://mushikago.com/i/?p=7801 で紹介されている gist-embed を使ってる。 LANG:php <?php // 現在、ファイルが複数ある時に対応していない // http://ayapi.github.io/posts/embeddinggists/ // のようにするともっといろいろできるらしい function plugin_gist_convert_sub($s) { if (!$s) { return ''; } if (preg_match('/^[0-9,]+$/', $s)) { return ' data-gist-highlight-line="' + $s + '"'; } if (preg_match('/^[,0-9\-]+$/', $s)) { return ' data-gist-line="' + $s + '"'; } return ' data-gist-file="' + $s + '"'; } function plugin_gist_convert() { global $script, $vars, $asin, $asin_all; $args = func_get_args(); $id = $args[0]; $options = plugin_gist_convert_sub($args[1]) + plugin_gist_convert_sub($args[2]) + plugin_gist_convert_sub($args[3]); return "<code data-gist-id=\"$id\"$options></code>"; // return "<script src=\"https://gist.github.com/$id.js\"></script>"; } ?> スキンの方に、 LANG:html <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/gist-embed/2.7.1/gist-embed.min.js"></script> も必要。 * 使用例 [#h6206c72] * github も貼れるようにすると良いのかも [#q8765c17] https://www.moongift.jp/2013/11/gist-it-githubのファイルをgist風に埋め込み表示/ gist-it というのを使うと良いみたい。
Counter: 2894 (from 2010/06/03),
today: 3,
yesterday: 0