A Pelican plugin to add meta-data to generated HTML pages
Go to file
2020-01-21 13:52:59 +01:00
__init__.py initial commit 2019-11-12 16:23:09 +01:00
page_metadata.py count all media on page, including background images, handle "i18n_subsites" plugin 2020-01-21 13:44:43 +01:00
README.md update readme 2020-01-21 13:52:59 +01:00

#Page Meta-Data

A Pelican plugin to add the total page size to each generated page of your site.

It calculates the weight of the HTML page including all image media and returns that in a human readable format (B, KB, MB).

Caveats:

it currently is tailored to https://solar.lowtechmagazine.com and needs work in the following areas:

  • add options to show file name and generation time
  • properly handle subsites plugin (currently it only works for dither+subsites)* make sure it works with --relative-urls flag

Use:

Add a div with id page-size to your template and page_metadata will place the result there.

have fun!