From 066c82cc780033239b805ba0be3bf2de57b95061 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Thu, 13 Nov 2025 11:49:15 +0800 Subject: [PATCH] fix: normalize language class names in code titles for consistency --- assets/css/_partials/_maps/_code-type.scss | 48 ++++++++++------------ assets/css/_partials/_single/_code.scss | 2 +- layouts/_partials/init/index.html | 2 +- 3 files changed, 24 insertions(+), 28 deletions(-) diff --git a/assets/css/_partials/_maps/_code-type.scss b/assets/css/_partials/_maps/_code-type.scss index 56940d5b..a0f5d990 100644 --- a/assets/css/_partials/_maps/_code-type.scss +++ b/assets/css/_partials/_maps/_code-type.scss @@ -4,13 +4,8 @@ * @generator https://github.com/hugo-fixit/.tools/blob/main/tampermonkey/code-type-map-fetcher.user.js */ $code-type-map: ( - "1S": "OnesEnterprise", - "1S:Enterprise": "OnesEnterprise", - "Cucumber": "Gherkin", - "Gherkin": "Gherkin", - "MZN": "MiniZinc", - "RPG IV": "RPGLE", - "SQLRPGLE": "RPGLE", + "1s": "OnesEnterprise", + "1s\\:enterprise": "OnesEnterprise", "abap": "ABAP", "abl": "OpenEdge ABL", "abnf": "ABNF", @@ -52,7 +47,7 @@ $code-type-map: ( "bib": "BibTeX", "bibtex": "BibTeX", "bicep": "Bicep", - "bind": "dns", + "bind": "Dns", "blitzbasic": "BlitzBasic", "bnf": "BNF", "bplus": "BlitzBasic", @@ -74,7 +69,7 @@ $code-type-map: ( "cf3": "CFEngine3", "cfengine3": "CFEngine3", "cfg": "INI", - "cfs": "cfstatement", + "cfs": "Cfstatement", "chai": "ChaiScript", "chaiscript": "ChaiScript", "chapel": "Chapel", @@ -193,7 +188,7 @@ $code-type-map: ( "j": "J", "janet": "Janet", "java": "Java", - "java-properties": "properties", + "java-properties": "Properties", "javascript": "JavaScript", "jinja": "Django/Jinja", "jl": "Julia", @@ -201,7 +196,7 @@ $code-type-map: ( "json": "JSON", "jsonata": "JSONata", "jsonnet": "Jsonnet", - "jsx": "react", + "jsx": "React", "julia": "Julia", "jungle": "Jungle", "kid": "Genshi", @@ -261,7 +256,7 @@ $code-type-map: ( "nimrod": "Nim", "nix": "Nix", "nixos": "Nix", - "no-highlight": "plaintext", + "no-highlight": "Plaintext", "nroff": "Groff", "nsh": "NSIS", "nsi": "NSIS", @@ -294,7 +289,7 @@ $code-type-map: ( "pkgconfig": "PkgConfig", "pl": "Perl", "pl6": "Raku", - "plain": "plaintext", + "plain": "Plaintext", "plc": "Plutus Core", "plpgsql": "PL/pgSQL", "plutus-core": "Plutus Core", @@ -337,17 +332,17 @@ $code-type-map: ( "ragel": "Ragel", "raku": "Raku", "rb": "Ruby", - "react": "react", + "react": "React", "reason": "ReasonML", "reasonml": "ReasonML", - "registry": "reg", + "registry": "Reg", "rego": "Rego", - "rest": "reStructuredText", - "restructuredtext": "reStructuredText", + "rest": "ReStructuredText", + "restructuredtext": "ReStructuredText", "rexx": "Rexx", "rkt": "Racket", "rs": "Rust", - "rst": "reStructuredText", + "rst": "ReStructuredText", "ruby": "Ruby", "rust": "Rust", "s": "R", @@ -378,6 +373,7 @@ $code-type-map: ( "spitfire": "Cheetah", "splus": "R", "sql": "SQL", + "sqlrpgle": "RPGLE", "squeak": "Smalltalk", "squid": "SquidConf", "squid\\.conf": "SquidConf", @@ -385,11 +381,11 @@ $code-type-map: ( "ssed": "Sed", "st": "Smalltalk", "stylus": "Stylus", - "sv": "systemverilog", + "sv": "Systemverilog", "svelte": "Svelte", "swift": "Swift", "systemd": "SYSTEMD", - "systemverilog": "systemverilog", + "systemverilog": "Systemverilog", "t-sql": "Transact-SQL", "tablegen": "TableGen", "tal": "Tal", @@ -401,7 +397,7 @@ $code-type-map: ( "terminfo": "Terminfo", "terraform": "Terraform", "tex": "TeX", - "text": "plaintext", + "text": "Plaintext", "tf": "Terraform", "thrift": "Thrift", "toml": "TOML", @@ -420,12 +416,12 @@ $code-type-map: ( "typst": "Typst", "udiff": "Diff", "uxntal": "Tal", - "v": "verilog", + "v": "Verilog", "vala": "Vala", "vapi": "Vala", "vb\\.net": "VB.net", "vbnet": "VB.net", - "verilog": "verilog", + "verilog": "Verilog", "vhdl": "VHDL", "vhs": "VHS", "vim": "VimL", @@ -433,8 +429,8 @@ $code-type-map: ( "vsh": "V shell", "vshell": "V shell", "vtt": "WebVTT", - "vue": "vue", - "vuejs": "vue", + "vue": "Vue", + "vuejs": "Vue", "wgsl": "WebGPU Shading Language", "whiley": "Whiley", "winbatch": "Batchfile", @@ -447,7 +443,7 @@ $code-type-map: ( "z80": "Z80 Assembly", "zed": "Zed", "zig": "Zig", - "zone": "dns", + "zone": "Dns", "zsh": "Bash", "🔥": "Mojo", // Custom code type diff --git a/assets/css/_partials/_single/_code.scss b/assets/css/_partials/_single/_code.scss index f6ae663f..22592643 100644 --- a/assets/css/_partials/_single/_code.scss +++ b/assets/css/_partials/_single/_code.scss @@ -150,7 +150,7 @@ pre:not([data-processed]) { } @each $type, $text in $code-type-map { - &.language-#{$type} .code-title::after { + &.language-#{to-lower-case($type)} .code-title::after { content: $text; } } diff --git a/layouts/_partials/init/index.html b/layouts/_partials/init/index.html index fbd4a1c8..7fee2bde 100644 --- a/layouts/_partials/init/index.html +++ b/layouts/_partials/init/index.html @@ -1,4 +1,4 @@ -{{- hugo.Store.Set "version" "v0.4.0-alpha.2-20251113030407-4bf8b5ab" -}} +{{- hugo.Store.Set "version" "v0.4.0-alpha.2-20251113034916-6f27a2b2" -}} {{- .Store.Set "this" dict -}} {{- partial "init/detection-env.html" . -}}