Tools and scripts to help build and maintain the FixIt theme.
.tools/
βββ tampermonkey/ # Tampermonkey userscripts
β βββ code-type-map-fetcher.user.js
βββ README.md
File: tampermonkey/code-type-map-fetcher.user.js
Description: Automatically fetches and generates a SCSS map of code identifiers/languages from Hugo's Chroma syntax highlighting documentation page.
Features:
- Extracts all supported languages from Hugo's official documentation
- Generates formatted SCSS
$code-type-mapvariable - Automatically copies the output to clipboard
- Downloads the generated SCSS file (
_code-type.scss)
Usage:
- Install Tampermonkey browser extension
- Install the script by clicking on
code-type-map-fetcher.user.jsand clicking "Raw" button - Visit Hugo's Syntax Highlighting page
- The script will automatically run and generate the SCSS map
Output Format:
/**
* 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: (
"abap": "ABAP",
"abnf": "ABNF",
"as": "ActionScript",
// ... more languages
// Custom code type
"markdown": "Markdown",
"yml": "YAML"
) !default;- FixIt Theme - A clean, elegant but advanced blog theme for Hugo
- Hugo - The world's fastest framework for building websites
Made with β€οΈ by FixIt team