Skip to content

hugo-fixit/.tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

.tools

Tools and scripts to help build and maintain the FixIt theme.

πŸ“ Structure

.tools/
β”œβ”€β”€ tampermonkey/          # Tampermonkey userscripts
β”‚   └── code-type-map-fetcher.user.js
└── README.md

πŸ› οΈ Tools

Tampermonkey Scripts

Code Type Map Fetcher

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-map variable
  • Automatically copies the output to clipboard
  • Downloads the generated SCSS file (_code-type.scss)

Usage:

  1. Install Tampermonkey browser extension
  2. Install the script by clicking on code-type-map-fetcher.user.js and clicking "Raw" button
  3. Visit Hugo's Syntax Highlighting page
  4. 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;

πŸ”— Related Projects

  • 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

About

Tools and scripts to help build and maintain the FixIt theme.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published