1
0
Fork 0
forked from github/pelican
Commit graph

278 commits

Author SHA1 Message Date
Lonewolf
c386e29d0c Ability to specify PLUGIN_PATH as list
PLUGIN_PATH added to settings table
2014-04-18 12:59:06 -07:00
Ondrej Grover
6703950abe enable writing of only selected output paths
- add WRITE_SELECTED setting
- add --write-selected commandline option
2014-04-17 19:36:18 +02:00
Ondrej Grover
fd77926700 Cache content to speed up reading. Fixes #224.
Cache read content so that it doesn't have to be read next time if its
source has not been modified.
2014-04-15 08:57:38 -04:00
Justin Mayer
7e06912bca Minor text changes to log message limitation 2014-04-14 16:18:07 -04:00
Rogdham
d9b0091357 Limit and filter logs
Drop duplicates logs.
Allow for logs to be grouped, enforcing a maximum number of logs per group.
Add the LOG_FILTER setting to ask from the configuration file to ignore some
logs (of level up to warning).
2014-04-01 20:44:09 +02:00
Helmut Grohne
3f304a2e92 change the inhibition value of *_SAVE_AS to ''
Previously, the documentation claimed the value of None for this purpose
even though False was used for certain defaults. The values False and
None cause warnings to be emitted from URLWrapper._from_settings though,
so the new way of inhibiting page generation is to set a *_SAVE_AS value
to the empty string.
2014-03-31 19:38:49 +02:00
th3aftermath
990ddb5a5e Fix Issue #1165 allows extensions to be set by certain settings
PAGINATION_PATTERNS was hard coded so that all files had a ".html" extension. This fixes that and add a test to
ensure that the pagination code is not changing the filename incorrectly.
2014-03-08 20:33:23 -05:00
th3aftermath
56b0061393 Add the setting SLUGIFY_ATTRIBUTE 2014-03-04 21:16:23 -05:00
Stefan hr Berder
652eb3686f add lang support for drafts (#826 & #1107)
Fix #826
Fix #1107
2014-02-23 14:03:09 +01:00
Simon Conseil
6264cf8916 Clarify docs about the DIRECT_TEMPLATES _SAVE_AS and _URL settings. 2014-01-05 23:37:44 +01:00
Iuri de Silvio
fb1cfc35bf Change CATEGORIES_URL and CATEGORIES_SAVE_AS docs to
make it consistent with TAGS_URL and TAGS_SAVE_AS.

Add default values to CATEGORIES_URL and CATEGORIES_SAVE_AS.
2014-01-05 18:34:23 -02:00
David Marble
0c69f4ad84 Support ordering pages and articles when iterating in templates.
Order can be set to a metadata attribute or a sorting function.
Default to order by slug for articles and order by filename for pages.
2013-11-14 12:35:50 -08:00
SDGSDG
3580233b38 Support for pygment defaults and relevant documentation 2013-09-15 23:13:17 -07:00
Talha Mansoor
48fa70c6a6 Add INTRASITE_LINK_REGEX to configuration that user can modify
This INTRASITE_LINK_REGEX is a string. It should have the capturing
group name which is `what`.

This change was made after discussions with @ametaireau and
@justinmayer.

1. https://github.com/getpelican/pelican/pull/1067
1. https://github.com/getpelican/pelican/pull/1071

Updates getpelican/pelican#1061
2013-09-09 00:06:18 +05:00
Justin Mayer
5a469dc2e3 Merge pull request #1011 from saimn/readers
Refactor readers and remove MARKUP. Fixes #866
2013-08-07 12:34:22 -07:00
Simon Conseil
4bc4b1500c Refactor readers and remove MARKUP
Add a `Readers` class which contains a dict of file extensions / `Reader`
instances. This dict can be overwritten with a `READERS` settings, for instance
to avoid processing *.html files:

    READERS = {'html': None}

Or to add a custom reader for the `foo` extension:

    READERS = {'foo': FooReader}

This dict is no storing the Reader classes as it was done before with
`EXTENSIONS`. It stores the instances of the Reader classes to avoid instancing
for each file reading.
2013-08-06 23:42:41 +02:00
Danilo Bargen
42f9726ffa Support TAGS_* and AUTHORS_* by default. 2013-08-05 19:16:00 +02:00
Justin Mayer
2aa0c6e24b Merge pull request #968 from russkel/encodingfix
Fix setting default locale and exception encoding
2013-08-03 16:42:37 -07:00
Justin Mayer
bea03bb4bb Merge pull request #979 from nyergler/pagination_conf
Support flexible pagination configuration
2013-08-03 14:58:47 -07:00
Nathan Yergler
50ff7ce89f Fall back to the default PAGINATION PATTERNS when none specified. 2013-08-03 14:04:58 -07:00
Nicholas Kuechler
92f5c06ba6 Group PDF related settings together. 2013-08-03 14:58:52 -05:00
Russ Webber
89034f8b3f added THEME_STATIC_DIR setting
The theme static output directory path is now customisable via settings.
i.e. you can now use 'assets' instead of 'theme'.
2013-08-01 11:02:38 +08:00
Nathan Yergler
9abc08ea9f Don't assume that PAGINATION_PATTERNS will always be present. 2013-07-31 18:57:21 -07:00
Nathan Yergler
95890a2a61 Allow definition of pagination rules by page index. 2013-07-29 08:10:28 -04:00
Ross McFarland
c5eecd23eb PAGINATION_URL/PAGINATION_SAVE_AS implementation
allows the use of custom urls for pagination similar to *_URLS
2013-07-29 08:09:44 -04:00
Russ Webber
2ace30cdb0 fix it not setting the default locale
If LOCALE was not specified in the settings file it would default
to [] insted of [''], where '' is used by locale.setlocale
to mean the user's default locale.
2013-07-21 13:31:11 +08:00
Andy Pearce
39518e15ef Allow text substitutions when generating slugs
The `slugify()` function used by Pelican is in general very good at
coming up with something both readable and URL-safe. However, there are
a few specific cases where it causes conflicts. One that I've run into
is using the strings `C++` and `C` as tags, both of which transform to
the slug `c`. This commit adds an optional `SLUG_SUBSTITUTIONS` setting
which is a list of 2-tuples of substitutions to be carried out
case-insensitively just prior to stripping out non-alphanumeric
characters. This allows cases like `C++` to be transformed to `CPP` or
similar. This can also improve the readability of slugs.
2013-07-04 12:17:21 +01:00
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
W. Trevor King
180cf9165f settings: Fix deprecation warning in configure_settings()
The broken code came from my 1d4d86c (settings: Rework the
LESS_GENERATOR removal warning for easy extension, 2013-03-24), where
I put formatting placeholders ({}) into the warning message, but
forgot to fill them in :/.
2013-06-13 21:18:57 -04:00
W. Trevor King
ce0a9b697e Document path metadata extraction 2013-06-12 17:37:22 -04:00
W. Trevor King
4058cfdea4 settings: Add a warning for folks using FILES_TO_COPY. 2013-06-12 17:37:21 -04:00
W. Trevor King
d43dc1b9d6 Add the EXTRA_PATH_METADATA setting
Useful for altering static output paths when you don't want to encode
extra metadata in the static file's source path.
2013-06-12 15:02:31 -04:00
W. Trevor King
1ca0e06a27 Remove the FILES_TO_COPY setting
We no longer instantiate the Static object in the StaticGenerator, so
we can't set the save_as argument anymore.  If you want to adjust the
output path, use the upcoming EXTRA_PATH_METADATA setting.
2013-06-12 15:02:31 -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
W. Trevor King
8511915294 settings: Cleanup configure_settings() (standardization & types)
This pulls out some general patterns to make it easier to apply
existing processing to new settings.
2013-06-02 13:32:10 -04:00
W. Trevor King
1d4d86c876 settings: Rework the LESS_GENERATOR removal warning for easy extension
Setting migration is something that will happen for multiple settings,
and the more we can standardize the reporting procedure, the easier it
will be to add new warnings.
2013-06-02 13:32:10 -04:00
W. Trevor King
e9dc1dd478 settings: Make DEFAULT_CONFIG public
This dictionary is accessed by plugins (like `summary`) which add new
settings, so it should be public (i.e. no prefixed underscore).

The changed name length would have led to a re-indenting of the
default contents anyway, so I shifted them all to four spaces.
2013-06-02 13:32:10 -04:00
Deniz Turgut
be8837963a ignore emacs lock files and exception handling for watchers 2013-04-22 20:50:11 -04:00
Justin Mayer
bdd702384f Improve wording of "cannot find" errors 2013-04-20 08:08:31 -07:00
Justin Mayer
870ec0efe8 Fix outdated link to documentation 2013-04-19 11:12:20 -07:00
Deniz Turgut
68921fe94d remove warning for FEED_DOMAIN when SITEURL undefined 2013-04-13 17:07:48 -04:00
Deniz Turgut
bc4bd773a0 remove unittest2 and fix various warnings in py3 2013-04-13 16:36:05 -04:00
Justin Mayer
0a8678a8ae Change RELATIVE_URLS default to False - Fixes #829 2013-04-11 16:12:55 -07:00
Deniz Turgut
c2924402ad Fix for issue #428: Use PLUGIN_PATH properly 2013-04-05 02:39:12 -04:00
David Beitey
e042e11c23 Add new option for controlling whether to display categories on menu or not
Conflicts:
	docs/changelog.rst
	pelican/tests/output/basic/tag/bar.html
	pelican/tests/output/basic/tag/baz.html
	pelican/tests/output/basic/tag/foo.html
	pelican/tests/output/custom/tag/bar.html
	pelican/tests/output/custom/tag/baz.html
	pelican/tests/output/custom/tag/foo.html
2013-04-01 22:08:13 +10:00
Alexis Métaireau
cb5f66ffe0 Check all lists are not strings. 2013-03-23 19:56:45 -07:00
Dave King
bd54cb1b88 Prevent people from setting STATIC_PATHS to a str
Previously you could accidentally set for example site/css and pelican would iterate through the string and attempt to copy '/' into your output.
2013-03-23 19:56:14 -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
W. Trevor King
a5c1fdac58 settings: Use splitext to remove extensions, not rpartition 2013-03-21 12:44:44 -04:00
W. Trevor King
e5e455e0e5 Replace os.sep.join with the more robust os.path.join
From the Python docs for os.sep [1]:

  Note that knowing this is not sufficient to be able to parse or
  concatenate pathnames - use os.path.split() and os.path.join()...

Where I touched a line, I also changed double quoted string literals
to single quotes, since they are used more often in the source:

  wking@mjolnir ~/src/pelican $ git grep "'" pelican/*.py | wc -l
  683
  wking@mjolnir ~/src/pelican $ git grep '"' pelican/*.py | wc -l
  181

[1]: http://docs.python.org/3/library/os.html#os.sep
2013-03-21 11:38:14 -04:00