fix: normalize language class names in code titles for consistency

This commit is contained in:
Cell
2025-11-13 11:49:15 +08:00
parent 6f27a2b215
commit 066c82cc78
3 changed files with 24 additions and 28 deletions
+22 -26
View File
@@ -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
+1 -1
View File
@@ -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;
}
}
+1 -1
View File
@@ -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" . -}}