agentsclimarketplace

Hatena syntax highlight

Skill redamoon/skills/skills/hatena-syntax-highlight

はてなブログのMarkdownモードでコードブロックのシンタックスハイライトを使用する際の記法ルールとベストプラクティス。From its SKILL.md

Install
npx -y skills add redamoon/skills --skill hatena-syntax-highlight

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

1.9 KB, 582 tokens by cl100k_base, as published. Nobody here has run it

はてなブログ シンタックスハイライト スキル

When to Use

  • はてなブログ(Markdownモード)の記事でコードブロックを記述・編集する際
  • はてなブログ向け記事のコードブロックに言語指定を付ける・直す際
  • はてなブログでシンタックスハイライトが効いていない・意図と違う表示になっているとき

Instructions

シンタックスハイライト

はてなブログでは、コードブロックのシンタックスハイライトに対応しています。

Markdownモードでの記法:

my $name = "Hatena";
print "Hello, $name\n";

上記のように、コードブロックの開始部分で言語を指定することで、その言語に応じたシンタックスハイライトが適用されます。

対応言語

はてなブログは500以上のファイルタイプ(プログラミング言語)に対応しています。主な言語例:

  • perl, python, ruby, javascript, typescript, java, go, rust, php, c, cpp, csharp, swift, kotlin, dart, elixir, crystal, nim, zig, jsx, tsx, terraform, hcl, toml, yaml, json, html, css, sql, bash, sh, zsh, markdown, dockerfile など

注意事項

  • コードブロックは必ず行頭から記述する
  • 言語名は小文字で指定する(例:javascripttypescript
  • はてな記法のスーパーpre記法(>||言語名||)も使用可能だが、Markdownモードでは上記の記法を推奨

詳細ははてなブログ ヘルプ - シンタックスハイライトを参照してください。

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,851. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.