1
0
Fork 0
forked from github/pelican
pelican-theme/pelican
Justin Mayer e9fec3b1dc Remove "clean" task from "make html"; fixes #637
This change removes the "clean" task from the "html" and "regenerate"
tasks in the default Makefile generated by pelican-quickstart. The
previous behavior ignored whether the DELETE_OUTPUT_DIRECTORY
setting was set to True or not and deleted everything in the output
directory every time the "make html" or "make regenerate" task was run.
In addition to violating the Principle of Least Astonishment, there was
also the potential for data loss if the user wasn't careful when
defining the output directory location in the Makefile.

The new behavior therefore relies primarily on the
DELETE_OUTPUT_DIRECTORY setting to control if and when the output
directory is cleaned. The default settings and Makefile generated by the
pelican-quickstart command, for example, no longer clean the output
directory when the "make html" task is run. If the user wants to change
this behavior and have the output directory cleaned on every "make html"
run, the recommended method would be to set DELETE_OUTPUT_DIRECTORY to
True in pelicanconf.py. Alternatively, the user can manually run "make
clean", with the caveat that the output directory and its contents will
be entirely destroyed, including any otherwise to-be-retained files or
folders specified in the OUTPUT_RETENTION setting. It is for that reason
that relying on the DELETE_OUTPUT_DIRECTORY setting is instead
recommended.

As before, DELETE_OUTPUT_DIRECTORY is set to True in the publishconf.py
settings file generated by the pelican-quickstart script. This way, any
potentially old and irrelevant files will be automatically removed
before the latest version of the site is transferred to the production
server environment.

In summary, this change allows for the sanest possible default settings,
while still allowing end users to customize output cleaning to their
preferred behavior with a minimum of confusion.
2013-06-24 13:05:00 -07:00
..
tests Merge pull request #898 from saimn/fix-markup-cli 2013-06-19 06:51:59 -07:00
themes Clean up and improve <head> of notmyidea theme 2013-04-23 06:51:22 -07:00
tools Remove "clean" task from "make html"; fixes #637 2013-06-24 13:05:00 -07:00
__init__.py Better duck typing in isinstance check 2013-06-20 00:13:57 +02:00
contents.py content: Don't update static content 2013-06-12 17:37:21 -04:00
generators.py Merge pull request #898 from saimn/fix-markup-cli 2013-06-19 06:51:59 -07:00
log.py fix for issue #761: handle unicode correctly in summary for Markdown 2013-04-03 19:38:42 -04:00
paginator.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
readers.py readers: Ensure the reader class is enabled before instantiating 2013-06-12 17:37:21 -04:00
rstdirectives.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
server.py Adding a message for gracefully shutting down dev server 2013-03-19 12:15:58 +01:00
settings.py settings: Fix deprecation warning in configure_settings() 2013-06-13 21:18:57 -04:00
signals.py generators: Update PagesGenerator to use new read_file 2013-06-12 15:02:31 -04:00
urlwrappers.py Make tags and cats case insensitive. Fixes #704. 2013-05-03 17:37:45 +01:00
utils.py Clean up minor text formatting, spelling, grammar 2013-06-22 12:28:37 -07:00
writers.py Replace settings.get(key) with settings[key] for default settings 2013-06-02 14:24:27 -04:00