From a4b56c8f69ad4517a2320d55d9faa747c082456e Mon Sep 17 00:00:00 2001 From: rra Date: Sun, 24 Nov 2019 15:27:44 +0100 Subject: [PATCH] added usage and setup instructions --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 60f1574..cf014a4 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,20 @@ #Page Meta-Data -A plugin to add meta-data for each generated page in the format: +A Pelican plugin to add meta-data for each generated page in the format: `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. \ No newline at end of file +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 `pelican.conf`: + +`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`. +