Small python CLI to compute and insert sizes of any routes in a Hugo static website.
This CLI call the Hugo command, you will need to have it in your path
This command is available on PyPI, you can install it with :
pip install hugo-sizer
You will need to include in your template an HTML tag with the id hugo-sizer and any text inside (ex. XX), this text will be replace by the actual size.
A basic usage is :
<div class="floating-size">
This page download only <span id="hugo-sizer">XX</span> kB.
</div>.floating-size{
position: fixed;
top: 0;
right: 0;
}After installing and generating your site public folder, you can run the cli in your Hugo project root directory:
hugo-sizer
This project is licensed under the MIT License