fix flake8 warnings
Set jinja environment defaults within settings
updating docs to remove JINJA_EXTENSIONS
update logger warning and defaults documentation
better way to grab jinja environment
updating settings after refactor
Fixes two bugs that was introduced by #1743:
- First was the unnecessary exception name output when skipping
content files if a required metadata wasn't available.
It was
`ERROR: Skipping ./demo.rst: could not find information about 'NameError: date'`
and now should be
`ERROR: Skipping ./demo.rst: could not find information about 'date'`
- Second was a more serious issue. Improper string formatting in the logger
resulted in implicit decoding and would break for non-ascii error messages.
This adheres more closely to the specs, especially Atom, where the
'description' arg becomes <summary>.
Note that this means full article content will no longer appear in RSS
feeds.
Also it may be allowed in the future (to process multiple values).
Also @avaris think it's bad to test something twice (see
https://github.com/getpelican/pelican/pull/2017), but for me confusion
lies in the "Why is list processing forbidden?", so, in a way, our
ideas converges in "let's not disallow processed items to be lists".
This reverts commit 9e574e9d8c.
Python's shutil.copy2 fails on Android when copying a file's meta data (perm bits, access times) onto certain filesystems. This is documented as python issue28141 https://bugs.python.org/issue28141
These commits workaround that bug by
+ creating a new function copy_file_metadata in utils.py
+ wrapping calls to copy2 in a try/except clause that logs any errors that occur but keep execution going
+ changing the calls to shutil.copy2 to calls to the new function
On systems with a none english default locale this test failed because the
period is a tuple of year and month name and the month name depends on the
locale.
Markdown.convert() returns early, without running any preprocessors, if
source.strip() is empty.
Before, Pelican would raise AttributeError in this case; now, it logs a
more friendly error:
ERROR: Skipping ./foo.md: could not find information about 'NameError: title'
which is more consistent with the error from empty .rst files:
ERROR: Skipping ./foo.rst: could not find information about 'NameError: date'