A Pelican plugin to add meta-data to generated HTML pages
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
711 B

5 years ago
#Page Meta-Data
A Pelican plugin to add meta-data for each generated page in the format:
5 years ago
`index.html Tue 12 Nov 2019 03:52:15 PM CET 57.637KB`
It calculates the weight of the HTML page including all image media. A time stamp reflecting the date of generation is also added.
The data is appended at the end of the HTML, so nothing fancy for now.
## Usage and setup
To use this plugin first import `strftime` at the top of `pelicanconf.py`:
`from time import strftime`
Then add `NOW = strftime('%c')` somewhere in that document as well. This saves the time of generation as a variable that is usable by the `page_metadata` plugin.
To enable the plugin add it to the `PLUGINS` list in `pelicanconf.py`.