This commit is contained in:
Deny Dias 2017-06-06 11:39:46 +00:00 committed by GitHub
commit 40e60a1d68
2 changed files with 4 additions and 0 deletions

View file

@ -230,6 +230,8 @@ Variable Description
============= ===================================================
article The article object to be displayed
category The name of the category for the current article
mdate The article modification date and time as it
appears in the filesystem
============= ===================================================
Any metadata that you put in the header of the article source file

View file

@ -632,6 +632,8 @@ def path_metadata(full_path, source_path, settings=None):
os.stat(full_path).st_mtime)
metadata.update(settings.get('EXTRA_PATH_METADATA', {}).get(
source_path, {}))
metadata['mdate'] = SafeDatetime.fromtimestamp(
os.stat(full_path).st_mtime)
return metadata