1
0
Fork 0
forked from github/pelican
Commit graph

132 commits

Author SHA1 Message Date
Justin Mayer
6f36b0a246 Keep certain files when cleaning output; fix #574
If DELETE_OUTPUT_DIRECTORY is set to True, all files and directories are
deleted from the output directory. There are, however, several reasons
one might want to retain certain files/directories and avoid their
deletion from the output directory. One such use case is version control
system data: a versioned output directory can facilitate deployment via
Heroku and/or allow the user to easily revert to a prior version of the
site without having to rely on regeneration via Pelican.

This change introduces the OUTPUT_RETENTION setting, a tuple of
filenames that will be preserved when the clean_output_dir function in
pelican.utils is run. Setting OUTPUT_RETENTION = (".hg", ".git") would,
for example, prevent the relevant VCS data from being deleted when the
output directory is cleaned.
2013-06-25 19:03:32 -07:00
Danilo Bargen
d8c9fb31d0 Better duck typing in isinstance check 2013-06-20 00:13:57 +02:00
W. Trevor King
0d1866b393 Pelican.run: Use keyword arguments when initializing generators
This makes it easier to add new arguments to Generator subclasses.
2013-06-16 12:15:26 -04:00
W. Trevor King
8ff34e6c5d Replace settings.get(key) with settings[key] for default settings
If a setting exists in DEFAULT_CONFIG, assume it will be there
(instead of checking and/or providing a local default).  The earlier
code was split between the two idioms, which was confusing.
2013-06-02 14:24:27 -04:00
Alexis Métaireau
ead50cca62 some cleanup 2013-05-13 13:53:52 +10:00
Alexis Metaireau
bcfd574664 Merge pull request #804 from dowlingw/master
#803 - Include default configuration file if present
2013-05-12 20:50:31 -07:00
Deniz Turgut
084818b399 Handle critical exception logging correctly in localized systems
Python generates certain exception messages (like IOError) in system
language, if locale is set. This ensures that the message is properly
converted to unicode in Python 2.
2013-05-04 04:55:42 -04:00
Deniz Turgut
be8837963a ignore emacs lock files and exception handling for watchers 2013-04-22 20:50:11 -04:00
Justin Mayer
e55878fc2e Merge pull request #857 from avaris/feedback
add feedback to user and refactor 'autoreload' code
2013-04-20 07:57:56 -07:00
Deniz Turgut
5ccbbcc7d1 add feedback to user and refactor 'autoreload' code 2013-04-19 13:35:20 -04:00
Deniz Turgut
a07052ff86 force argparse output to be unicode in Py2 2013-04-18 15:03:43 -04:00
Deniz Turgut
a3e8a2d18d __import__ fails for unicode 'fromlist' in Py2.x 2013-04-14 17:03:19 -04:00
Deniz Turgut
c2924402ad Fix for issue #428: Use PLUGIN_PATH properly 2013-04-05 02:39:12 -04:00
Will Dowling
de69739774 Fixing help text 2013-03-26 02:42:11 +00:00
Will Dowling
0d43017704 Adding information to argparse help 2013-03-26 10:37:37 +08:00
Will Dowling
608e398386 Removing utils.file_exists and replacing with os.path.isfile 2013-03-25 10:45:43 +00:00
Will Dowling
b06fbd78cc Load a default-named configuration file if present 2013-03-25 10:39:22 +00:00
Alexis Metaireau
ff571967cf Merge pull request #790 from davidjb/raise-exceptions
Raise exceptions from the autoreload loop if debug is enabled
2013-03-22 00:34:10 -07:00
W. Trevor King
b59da89e80 Convert '.' and '..' to the less magical os.curdir and os.pardir
While I'm cleaning up path manipulation, I might as well make things
more semantic.
2013-03-21 12:44:44 -04:00
David Beitey
1ff16f248b Raise exceptions from the autoreload loop if debug is enabled 2013-03-21 15:52:42 +10:00
dave mankoff
44351aaf31 delete output directory properly 2013-03-03 22:14:05 -08:00
Alexis Métaireau
519dcdbcb3 Manual pass on sources for better standards. 2013-03-03 20:12:31 -08:00
Rıdvan Örsvuran
0288bf1f68 added IGNORE_FILES setting for autoreload 2013-01-23 01:02:46 +01:00
Dirk Makowski
71995d5e1b Port pelican to python 3.
Stays compatible with 2.x series, thanks to an unified codebase.
2013-01-11 03:20:09 +01:00
Alexis Métaireau
f92c0cb69d update the version scheme to support micro versions 2012-12-04 01:43:19 +01:00
Alexis Métaireau
be2a3f4030 bump version number 2012-12-04 01:27:16 +01:00
Bruno Binet
a0504aeabe add support for relative cross-site links 2012-12-01 21:32:02 +01:00
Bruno Binet
c74abe579b Don't rewrite URLs
Remove the code that was appending ../static in front of some URLs, and add a
way to do cross-content linking.
2012-12-01 21:30:50 +01:00
Simon
4cfb0cd24e Move Webassets in a plugin 2012-11-07 00:17:50 +01:00
Simon
d0f5875f66 remove the LessCSSGenerator and the related config option 2012-11-05 21:51:27 +01:00
Bruno Binet
e0e1b3eecf rename STATIC_PAGES to TEMPLATE_PAGES 2012-10-30 09:56:10 +01:00
Tarek Ziade
a91f1cab5d activate the static page generator only if the option is used
Conflicts:
	pelican/__init__.py
2012-10-30 09:56:10 +01:00
Tarek Ziade
7127676f71 added a static pages generator
Conflicts:
	pelican/__init__.py
	pelican/generators.py
	pelican/settings.py
2012-10-30 09:56:08 +01:00
Bruno Binet
0856b72c3c cosmetics
lines should be < 80 chars
2012-10-22 23:05:18 +02:00
jawher
a11726783e TRANSLATION_FEED is now split into TRANSLATION_FEED_ATOM and TRANSLATION_FEED_RSS to match the other feed configuration keys
Incidentally, Pelican can now generate RSS translation feeds.
2012-10-22 22:52:06 +02:00
Bruno Binet
4029f2ec82 refactoring so that command line options override settings
and Pelican class now accepts a single parameter ``settings``
2012-10-16 01:35:39 +02:00
Alexis Métaireau
17dc36aad6 merge upstream 2012-10-12 23:22:55 +02:00
tBunnyMan
ffc8ec7a5b Add sleep to no files exception to avoid CPU load 2012-10-12 23:01:50 +02:00
m-r-r
0073c64e21 Sitemap plugin & get_generators signal
This is a combination of 13 commits:

1. New signal for registering custom generators
2. New plugin: pelican.plugins.sitemap
3. pelican.plugins.sitemap: more settings
4. pelican.plugins.sitemap: translations are indexed
5. pelican.plugins.sitemap: added documentation
6. pelican.plugins.sitemap: added XML DTD & W3C dates
7. pelican.plugins.sitemap: removed a <changefreq> bug
8. the `get_generators` can now return a tuple
9. pelican.plugins.sitemap: cleaned the code
10. pelican.plugin.sitemap: settings changes
11. sitemap plugin: improved configuration & documentation
12. sitemap plugin: :set spell
13. sitemap plugin: removed useless whitespaces
2012-10-12 23:01:50 +02:00
Nico Di Rocco
519d664a40 Added a new signal finalized that is dispatched when pelican finishes.
This signal can then be used for post processing.
2012-10-12 23:01:50 +02:00
Alexis Metaireau
48625964f1 Merge pull request #510 from nrocco/sourcegen
New source file .text generator
2012-10-12 13:57:18 -07:00
tBunnyMan
55783fc3a1 Add sleep to no files exception to avoid CPU load 2012-09-28 08:53:59 -07:00
Nico Di Rocco
0a1a868b37 Added sourcefile generator that generates .text files 2012-09-15 23:11:09 +02:00
Nico Di Rocco
75312305b9 Merge branch 'master' of git://github.com/getpelican/pelican 2012-09-07 08:49:00 +02:00
m-r-r
229b0e4dcc Sitemap plugin & get_generators signal
This is a combination of 13 commits:

1. New signal for registering custom generators
2. New plugin: pelican.plugins.sitemap
3. pelican.plugins.sitemap: more settings
4. pelican.plugins.sitemap: translations are indexed
5. pelican.plugins.sitemap: added documentation
6. pelican.plugins.sitemap: added XML DTD & W3C dates
7. pelican.plugins.sitemap: removed a <changefreq> bug
8. the `get_generators` can now return a tuple
9. pelican.plugins.sitemap: cleaned the code
10. pelican.plugin.sitemap: settings changes
11. sitemap plugin: improved configuration & documentation
12. sitemap plugin: :set spell
13. sitemap plugin: removed useless whitespaces
2012-09-02 18:17:22 +02:00
Nico Di Rocco
680e04b4a1 Merge remote-tracking branch 'upstream/master' 2012-08-31 22:04:05 +02:00
Alexis Metaireau
88555de28c Merge pull request #490 from tbunnyman/fixDEFAULT_CONFIGoverwrite
Deep copy _DEFAULT_SETTINGS instead of linking.
2012-08-30 15:08:28 -07:00
tBunnyMan
644fd4ed5f Deep copy _DEFAULT_SETTINGS instead of linking.
This caused the defaults to be overwritten and edge case bugs with tests.
The test for empty setting needed to be updated to reflect that the method
for setting up the local settings sets extra settings.
2012-08-29 13:36:15 -07:00
tBunnyMan
a37ba369ef Implemented better "valid files not found" behavior.
Used an exception so show error state.
Used a bool flag to make sure the error is only shown once PER error.
Updated tests to check for the correct Exception raised
2012-08-23 12:44:22 -07:00
Nico Di Rocco
e9a0717aea Added a new signal finalized that is dispatched when pelican finishes.
This signal can then be used for post processing.
2012-08-22 23:05:07 +02:00