From 6f27a2b2152ac5f59f368d62a03e5dcb164a0a98 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Thu, 13 Nov 2025 11:04:06 +0800 Subject: [PATCH] feat: update code type map with additional languages and improved documentation Feedback from QQ group 814031017 --- assets/css/_partials/_maps/_code-type.scss | 361 ++++++++++++-------- layouts/_partials/function/xml-content.html | 1 - layouts/_partials/init/index.html | 2 +- 3 files changed, 223 insertions(+), 141 deletions(-) diff --git a/assets/css/_partials/_maps/_code-type.scss b/assets/css/_partials/_maps/_code-type.scss index 63e16f77..56940d5b 100644 --- a/assets/css/_partials/_maps/_code-type.scss +++ b/assets/css/_partials/_maps/_code-type.scss @@ -1,235 +1,290 @@ -// Code type map +/** + * Map of code identifiers/languages to Chroma supported languages. + * + * @generator https://github.com/hugo-fixit/.tools/blob/main/tampermonkey/code-type-map-fetcher.user.js + */ $code-type-map: ( - // Chroma supported languages - // @generator https://github.com/hugo-fixit/.tools/blob/main/tampermonkey/code-type-map-fetcher.user.js + "1S": "OnesEnterprise", + "1S:Enterprise": "OnesEnterprise", + "Cucumber": "Gherkin", + "Gherkin": "Gherkin", + "MZN": "MiniZinc", + "RPG IV": "RPGLE", + "SQLRPGLE": "RPGLE", "abap": "ABAP", + "abl": "OpenEdge ABL", "abnf": "ABNF", - "as": "ActionScript", + "aconf": "ApacheConf", "actionscript": "ActionScript", - "as3": "ActionScript 3", "actionscript3": "ActionScript 3", "ada": "Ada", - "ada95": "Ada", "ada2005": "Ada", + "ada95": "Ada", + "agda": "Agda", + "ahk": "AutoHotkey", "al": "AL", - "ng2": "Angular2", + "alloy": "Alloy", "antlr": "ANTLR", - "apacheconf": "ApacheConf", - "aconf": "ApacheConf", "apache": "ApacheConf", + "apacheconf": "ApacheConf", "apl": "APL", "applescript": "AppleScript", + "aql": "ArangoDB AQL", "arduino": "Arduino", + "arexx": "Rexx", "armasm": "ArmAsm", + "as": "ActionScript", + "as3": "ActionScript 3", + "asm": "GAS", + "atl": "ATL", + "autohotkey": "AutoHotkey", + "autoit": "AutoIt", "awk": "Awk", - "gawk": "Awk", - "mawk": "Awk", - "nawk": "Awk", + "b3d": "BlitzBasic", "ballerina": "Ballerina", - "make": "Base Makefile", - "makefile": "Base Makefile", - "mf": "Base Makefile", - "bsdmake": "Base Makefile", "bash": "Bash", - "sh": "Bash", - "ksh": "Bash", - "zsh": "Bash", - "shell": "Bash", - "bash-session": "BashSession", - "console": "BashSession", - "shell-session": "BashSession", + "bash-session": "Bash Session", + "basic": "QBasic", "bat": "Batchfile", "batch": "Batchfile", - "dosbatch": "Batchfile", - "winbatch": "Batchfile", + "beef": "Beef", + "bf": "Brainfuck", "bib": "BibTeX", "bibtex": "BibTeX", "bicep": "Bicep", + "bind": "dns", "blitzbasic": "BlitzBasic", - "b3d": "BlitzBasic", - "bplus": "BlitzBasic", "bnf": "BNF", + "bplus": "BlitzBasic", + "bqn": "BQN", "brainfuck": "Brainfuck", - "bf": "Brainfuck", + "bsdmake": "Makefile", "c": "C", - "csharp": "C#", "c\\#": "C#", - "cpp": "C++", "c\\+\\+": "C++", - "caddyfile": "Caddyfile", "caddy": "Caddyfile", - "caddyfile-directives": "Caddyfile Directives", - "caddyfile-d": "Caddyfile Directives", "caddy-d": "Caddyfile Directives", + "caddyfile": "Caddyfile", + "caddyfile-d": "Caddyfile Directives", + "caddyfile-directives": "Caddyfile Directives", "capnp": "Cap'n Proto", "cassandra": "Cassandra CQL", - "cql": "Cassandra CQL", + "cassette": "VHS", "ceylon": "Ceylon", - "cfengine3": "CFEngine3", "cf3": "CFEngine3", + "cfengine3": "CFEngine3", + "cfg": "INI", "cfs": "cfstatement", "chai": "ChaiScript", "chaiscript": "ChaiScript", + "chapel": "Chapel", "cheetah": "Cheetah", - "spitfire": "Cheetah", - "clojure": "Clojure", + "chpl": "Chapel", + "cl": "Common Lisp", "clj": "Clojure", + "clojure": "Clojure", "cmake": "CMake", "cobol": "COBOL", + "coffee": "CoffeeScript", "coffee-script": "CoffeeScript", "coffeescript": "CoffeeScript", - "coffee": "CoffeeScript", "common-lisp": "Common Lisp", - "cl": "Common Lisp", - "lisp": "Common Lisp", + "console": "Bash Session", + "containerfile": "Docker", "coq": "Coq", + "core": "Core", + "cpp": "C++", + "cql": "Cassandra CQL", "cr": "Crystal", "crystal": "Crystal", + "csh": "Tcsh", + "csharp": "C#", "css": "CSS", + "csv": "CSV", + "cucumber": "Gherkin", + "cue": "CUE", "cython": "Cython", - "pyx": "Cython", - "pyrex": "Cython", "d": "D", "dart": "Dart", + "dax": "Dax", + "desktop": "Desktop file", + "desktop_entry": "Desktop file", "diff": "Diff", - "udiff": "Diff", "django": "Django/Jinja", - "jinja": "Django/Jinja", "docker": "Docker", "dockerfile": "Docker", + "dosbatch": "Batchfile", + "dosini": "INI", "dtd": "DTD", + "duby": "Ruby", "dylan": "Dylan", "ebnf": "EBNF", + "edn": "Clojure", + "elisp": "EmacsLisp", "elixir": "Elixir", - "ex": "Elixir", - "exs": "Elixir", "elm": "Elm", "emacs": "EmacsLisp", - "elisp": "EmacsLisp", "emacs-lisp": "EmacsLisp", "erlang": "Erlang", + "ex": "Elixir", + "exs": "Elixir", + "f90": "Fortran", "factor": "Factor", "fennel": "Fennel", - "fnl": "Fennel", "fish": "Fish", "fishshell": "Fish", + "fnl": "Fennel", "forth": "Forth", "fortran": "Fortran", "fortranfixed": "FortranFixed", "fsharp": "FSharp", "gas": "GAS", - "asm": "GAS", - "gdscript": "GDScript", + "gawk": "Awk", "gd": "GDScript", + "gd3": "GDScript3", + "gdscript": "GDScript", + "gdscript3": "GDScript3", + "gemini": "Gemtext", + "gemtext": "Gemtext", "genshi": "Genshi", - "kid": "Genshi", - "xml\\+genshi": "Genshi", - "xml\\+kid": "Genshi", - "html\\+genshi": "Genshi HTML", - "html\\+kid": "Genshi HTML", "genshitext": "Genshi Text", - "cucumber": "Gherkin", - "Cucumber": "Gherkin", "gherkin": "Gherkin", - "Gherkin": "Gherkin", + "gleam": "Gleam", "glsl": "GLSL", + "gmi": "Gemtext", + "gmni": "Gemtext", "gnuplot": "Gnuplot", "go": "Go", - "golang": "Go", "go-html-template": "Go HTML Template", + "go-template": "Go Template", "go-text-template": "Go Text Template", + "golang": "Go", + "gql": "GraphQL", "graphql": "GraphQL", "graphqls": "GraphQL", - "gql": "GraphQL", "groff": "Groff", - "nroff": "Groff", - "man": "Groff", "groovy": "Groovy", + "gsed": "Sed", "handlebars": "Handlebars", - "hbs": "Handlebars", + "hare": "Hare", "haskell": "Haskell", - "hs": "Haskell", - "hx": "Haxe", "haxe": "Haxe", - "hxsl": "Haxe", - "hcl": "HCL", + "hbs": "Handlebars", + "hcl": "Terraform", "hexdump": "Hexdump", "hlb": "HLB", + "hlsl": "HLSL", + "holyc": "HolyC", + "hs": "Haskell", "html": "HTML", + "html\\+genshi": "Genshi HTML", + "html\\+kid": "Genshi HTML", "http": "HTTP", + "hx": "Haxe", + "hxsl": "Haxe", "hylang": "Hy", - "idris": "Idris", "idr": "Idris", + "idris": "Idris", "igor": "Igor", "igorpro": "Igor", "ini": "INI", - "cfg": "INI", - "dosini": "INI", "io": "Io", + "iscdhcpd": "ISCdhcpd", "j": "J", + "janet": "Janet", "java": "Java", - "js": "JavaScript", + "java-properties": "properties", "javascript": "JavaScript", - "json": "JSON", - "julia": "Julia", + "jinja": "Django/Jinja", "jl": "Julia", + "js": "JavaScript", + "json": "JSON", + "jsonata": "JSONata", + "jsonnet": "Jsonnet", + "jsx": "react", + "julia": "Julia", "jungle": "Jungle", + "kid": "Genshi", "kotlin": "Kotlin", - "lighty": "Lighttpd configuration file", + "ksh": "Bash", + "latex": "TeX", + "lean": "Lean4", + "lean4": "Lean4", "lighttpd": "Lighttpd configuration file", + "lighty": "Lighttpd configuration file", + "lisp": "Common Lisp", "llvm": "LLVM", "lua": "Lua", + "luau": "Lua", + "m2": "Modula-2", + "make": "Makefile", + "makefile": "Makefile", "mako": "Mako", - "md": "Markdown", - "mkd": "Markdown", + "man": "Groff", + "mariadb": "MySQL", "mason": "Mason", + "materialize": "Materialize SQL dialect", "mathematica": "Mathematica", - "mma": "Mathematica", - "nb": "Mathematica", "matlab": "Matlab", - "mcfunction": "mcfunction", + "mawk": "Awk", + "mcf": "MCFunction", + "mcfunction": "MCFunction", + "md": "Markdown", "meson": "Meson", "meson\\.build": "Meson", "metal": "Metal", + "mf": "Makefile", "minizinc": "MiniZinc", - "MZN": "MiniZinc", - "mzn": "MiniZinc", + "mkd": "Markdown", "mlir": "MLIR", + "mma": "Mathematica", "modula2": "Modula-2", - "m2": "Modula-2", + "mojo": "Mojo", "monkeyc": "MonkeyC", + "moon": "MoonScript", + "moonscript": "MoonScript", "morrowind": "MorrowindScript", "mwscript": "MorrowindScript", "myghty": "Myghty", "mysql": "MySQL", - "mariadb": "MySQL", + "mzn": "MiniZinc", + "mzsql": "Materialize SQL dialect", "nasm": "NASM", + "natural": "Natural", + "nawk": "Awk", + "nb": "Mathematica", + "ndisasm": "NDISASM", "newspeak": "Newspeak", + "ng2": "Angular2", "nginx": "Nginx configuration file", "nim": "Nim", "nimrod": "Nim", - "nixos": "Nix", "nix": "Nix", - "objective-c": "Objective-C", - "objectivec": "Objective-C", + "nixos": "Nix", + "no-highlight": "plaintext", + "nroff": "Groff", + "nsh": "NSIS", + "nsi": "NSIS", + "nsis": "NSIS", + "nu": "Nu", "obj-c": "Objective-C", "objc": "Objective-C", + "objective-c": "Objective-C", + "objectivec": "Objective-C", + "objectpascal": "ObjectPascal", "ocaml": "OCaml", "octave": "Octave", + "odin": "Odin", "ones": "OnesEnterprise", "onesenterprise": "OnesEnterprise", - "1S": "OnesEnterprise", - "1S:Enterprise": "OnesEnterprise", "openedge": "OpenEdge ABL", - "abl": "OpenEdge ABL", - "progress": "OpenEdge ABL", "openedgeabl": "OpenEdge ABL", "openscad": "OpenSCAD", "org": "Org Mode", "orgmode": "Org Mode", "pacmanconf": "PacmanConf", "perl": "Perl", - "pl": "Perl", + "perl6": "Raku", "php": "PHP", "php3": "PHP", "php4": "PHP", @@ -237,136 +292,164 @@ $code-type-map: ( "phtml": "PHTML", "pig": "Pig", "pkgconfig": "PkgConfig", - "plpgsql": "PL/pgSQL", - "text": "plaintext", + "pl": "Perl", + "pl6": "Raku", "plain": "plaintext", - "no-highlight": "plaintext", - "plutus-core": "Plutus Core", "plc": "Plutus Core", + "plpgsql": "PL/pgSQL", + "plutus-core": "Plutus Core", "pony": "Pony", - "postgresql": "PostgreSQL SQL dialect", + "posh": "PowerShell", "postgres": "PostgreSQL SQL dialect", - "postscript": "PostScript", + "postgresql": "PostgreSQL SQL dialect", "postscr": "PostScript", + "postscript": "PostScript", "pov": "POVRay", "powerquery": "PowerQuery", - "pq": "PowerQuery", "powershell": "PowerShell", - "posh": "PowerShell", - "ps1": "PowerShell", - "psm1": "PowerShell", - "psd1": "PowerShell", + "pq": "PowerQuery", + "progress": "OpenEdge ABL", "prolog": "Prolog", + "promela": "Promela", "promql": "PromQL", - "protobuf": "Protocol Buffer", "proto": "Protocol Buffer", + "protobuf": "Protocol Buffer", + "prql": "PRQL", + "ps1": "PowerShell", + "psd1": "PowerShell", + "psl": "PSL", + "psm1": "PowerShell", "puppet": "Puppet", - "python": "Python", + "pwsh": "PowerShell", "py": "Python", - "sage": "Python", - "python3": "Python", - "py3": "Python", - "python2": "Python 2", "py2": "Python 2", + "py3": "Python", + "pyrex": "Cython", + "python": "Python", + "python2": "Python 2", + "python3": "Python", + "pyx": "Cython", "qbasic": "QBasic", - "basic": "QBasic", - "qml": "QML", "qbs": "QML", - "splus": "R", - "s": "R", + "qml": "QML", "r": "R", "racket": "Racket", - "rkt": "Racket", "ragel": "Ragel", - "perl6": "Raku", - "pl6": "Raku", "raku": "Raku", - "jsx": "react", + "rb": "Ruby", "react": "react", "reason": "ReasonML", "reasonml": "ReasonML", "registry": "reg", - "rst": "reStructuredText", + "rego": "Rego", "rest": "reStructuredText", "restructuredtext": "reStructuredText", "rexx": "Rexx", - "arexx": "Rexx", - "rb": "Ruby", - "ruby": "Ruby", - "duby": "Ruby", - "rust": "Rust", + "rkt": "Racket", "rs": "Rust", + "rst": "reStructuredText", + "ruby": "Ruby", + "rust": "Rust", + "s": "R", + "sage": "Python", "sas": "SAS", "sass": "Sass", "scala": "Scala", "scheme": "Scheme", - "scm": "Scheme", "scilab": "Scilab", + "scm": "Scheme", "scss": "SCSS", + "sed": "Sed", + "sh": "Bash", + "shell": "Bash", + "shell-session": "Bash Session", "sieve": "Sieve", + "smali": "Smali", "smalltalk": "Smalltalk", - "squeak": "Smalltalk", - "st": "Smalltalk", "smarty": "Smarty", + "sml": "Standard ML", + "snbt": "SNBT", "snobol": "Snobol", "sol": "Solidity", "solidity": "Solidity", + "sp": "SourcePawn", "sparql": "SPARQL", + "spec": "RPMSpec", + "spitfire": "Cheetah", + "splus": "R", "sql": "SQL", - "squidconf": "SquidConf", - "squid\\.conf": "SquidConf", + "squeak": "Smalltalk", "squid": "SquidConf", - "sml": "Standard ML", + "squid\\.conf": "SquidConf", + "squidconf": "SquidConf", + "ssed": "Sed", + "st": "Smalltalk", "stylus": "Stylus", + "sv": "systemverilog", "svelte": "Svelte", "swift": "Swift", "systemd": "SYSTEMD", "systemverilog": "systemverilog", - "sv": "systemverilog", + "t-sql": "Transact-SQL", "tablegen": "TableGen", + "tal": "Tal", + "tape": "VHS", "tasm": "TASM", "tcl": "Tcl", "tcsh": "Tcsh", - "csh": "Tcsh", "termcap": "Termcap", "terminfo": "Terminfo", "terraform": "Terraform", - "tf": "Terraform", "tex": "TeX", - "latex": "TeX", + "text": "plaintext", + "tf": "Terraform", "thrift": "Thrift", "toml": "TOML", "tradingview": "TradingView", - "tv": "TradingView", + "ts": "TypeScript", "tsql": "Transact-SQL", - "t-sql": "Transact-SQL", + "tsx": "TypeScript", "turing": "Turing", "turtle": "Turtle", + "tv": "TradingView", "twig": "Twig", - "ts": "TypeScript", - "tsx": "TypeScript", "typescript": "TypeScript", "typoscript": "TypoScript", "typoscriptcssdata": "TypoScriptCssData", "typoscripthtmldata": "TypoScriptHtmlData", + "typst": "Typst", + "udiff": "Diff", + "uxntal": "Tal", "v": "verilog", - "vlang": "V", - "vsh": "V shell", - "vshell": "V shell", + "vala": "Vala", + "vapi": "Vala", "vb\\.net": "VB.net", "vbnet": "VB.net", "verilog": "verilog", "vhdl": "VHDL", + "vhs": "VHS", "vim": "VimL", + "vlang": "V", + "vsh": "V shell", + "vshell": "V shell", + "vtt": "WebVTT", "vue": "vue", "vuejs": "vue", + "wgsl": "WebGPU Shading Language", "whiley": "Whiley", + "winbatch": "Batchfile", "xml": "XML", + "xml\\+genshi": "Genshi", + "xml\\+kid": "Genshi", "xorg\\.conf": "Xorg", "yaml": "YAML", "yang": "YANG", + "z80": "Z80 Assembly", "zed": "Zed", "zig": "Zig", + "zone": "dns", + "zsh": "Bash", + "🔥": "Mojo", // Custom code type "markdown": "Markdown", "yml": "YAML" diff --git a/layouts/_partials/function/xml-content.html b/layouts/_partials/function/xml-content.html index 0c7c213f..116e7ab0 100644 --- a/layouts/_partials/function/xml-content.html +++ b/layouts/_partials/function/xml-content.html @@ -66,5 +66,4 @@ {{- end }} - {{- return $content -}} diff --git a/layouts/_partials/init/index.html b/layouts/_partials/init/index.html index 0b75dfae..fbd4a1c8 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-20251023040336-063af2cd" -}} +{{- hugo.Store.Set "version" "v0.4.0-alpha.2-20251113030407-4bf8b5ab" -}} {{- .Store.Set "this" dict -}} {{- partial "init/detection-env.html" . -}}