Skip to content

Package to compute and insert full size for every page in a Hugo static website

License

Notifications You must be signed in to change notification settings

chbricout/hugo-sizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hugo Sizer

Small python CLI to compute and insert sizes of any routes in a Hugo static website.

Getting Started

Prerequisites

This CLI call the Hugo command, you will need to have it in your path

Installing

This command is available on PyPI, you can install it with :

pip install hugo-sizer

Usage

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

License

This project is licensed under the MIT License

About

Package to compute and insert full size for every page in a Hugo static website

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages