Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A Gulp-based asset pipeline for Hugo that minifies, concatenates, fingerprints, and optimizes CSS, JS, HTML, and images.
hugulp is a Gulp-based asset pipeline tool for Hugo websites that minifies, concatenates, fingerprints, and optimizes static assets to reduce page load times.
hugulp is a command-line tool that runs an asset pipeline on the output of a Hugo static site build, internally driven by Gulp, to minify, concatenate, fingerprint, and optimize CSS, JavaScript, HTML, and images. It takes the static files generated by Hugo in the public folder and processes them in place; a watch mode also compiles Sass/Less and lints JavaScript during development. The tool was created by Juan B. Rodriguez and is released under the MIT License.
hugulp watch monitors assets/styles and assets/scripts recursively and writes compiled output into Hugo's static folder..hugulprc file lets you customize which tasks run, folder names, image optimization options (gifsicle, jpegtran, optipng, svgo), and minifier settings.hugo builds the site.hugo then hugulp build to minify CSS/JS/HTML, optimize images, and fingerprint assets in the public folder.hugulp watch to auto-convert files from assets/styles into static/styles and lint JavaScript..hugulprc to remove the fingerprint task, rename folders like styles to css, or adjust svgo and optipng settings.npm install -g hugulp.hugulp init to create a default .hugulprc in your Hugo site.static/ or use assets/ for Sass/Less preprocessing.hugo to generate the public folder, then hugulp build to run the pipeline.Yes, hugulp is open source under the MIT License and can be installed for free via npm.
Yes, version 2 added support for themes out of the box, so assets from themes are included in the pipeline.
The author archived the repository in August 2021 because Hugo Pipes provides most of the same asset-processing features natively. Only image optimization is missing from Hugo Pipes, and the author suggests it can be built as a custom pipe.
You still use Hugo to build the site, but after that you run hugulp build to optimize the public folder. During development, you can use hugulp watch to compile Sass/Less and lint JavaScript automatically.