Hugo Preproc screenshot

Hugo Preproc

Author Avatar Theme by Jason dour
Updated: 8 Sep 2025
12 Stars

Helper for Hugo to provide for pre-processing of files.

Overview

Hugo-preprocHelper is a powerful tool designed to streamline the pre-processing of files for use with the Hugo static site generator. With its ability to handle various types of file manipulations, it serves as a versatile pre-processor that can enhance your workflow, especially when dealing with diagrams or generating Markdown from Git history. The flexibility of this tool makes it ideal for developers and content creators alike, who are looking to optimize their publishing processes.

This tool allows users to customize their pre-processing tasks through a configuration file, making it easy to implement changes as needed. Whether you’re rendering SVG diagrams or processing Git logs, Hugo-preprocHelper provides a robust and efficient solution to prepare your files for publication.

Features

  • Flexible Configuration: Users can define processing rules using a configuration file (.yaml, .toml, or .json), allowing easy customization of tasks based on specific project needs.

  • Git History Processing: The tool can generate Markdown or data files by utilizing Git history, making it straightforward to keep documentation up-to-date with commit logs.

  • Support for Various Diagrams: Hugo-preprocHelper supports converting diagrams from various tools like Mermaid, Draw.io, and Graphviz into SVG format, enhancing the visual appeal of your content.

  • Go Template Integration: By utilizing Go Templates, the tool enables advanced processing of data, seamlessly integrating user-defined templates into the workflow.

  • Multiple Processing Modes: The configuration allows users to choose different processing modes for both Git handlers and file execution, such as handling only the latest commit or all entries.

  • Command and Script Execution: Users can run commands or Tengo scripts on files based on defined patterns, offering great flexibility in how processed files are managed.

  • Recursive File Scanning: The tool automatically scans directories for matching filenames, saving time and effort in file organization and processing.

  • Sequential Execution: Array entries in the configuration file are executed in the order defined, ensuring that processes occur correctly and without interference.