1
0
Fork 0
forked from github/pelican
Commit graph

195 commits

Author SHA1 Message Date
Justin Mayer
426c7428d6 Merge pull request #1426 from barrysteyn/DOCUTILS_SETTINGS
Documents DOCUTILS_SETTINGS and initializes it. Fixes #1425
2014-09-18 16:17:46 -07:00
Justin Mayer
1d9981b4f9 Merge pull request #1348 from vjousse/davidmarble-page-order-by
Support ordering pages and articles when iterating in templates.
2014-09-18 16:12:51 -07:00
Justin Mayer
b8c9d61f20 Merge pull request #1411 from barrysteyn/typogrify-ignore-list
Allow Typogrify to ignore user specified tags. Refs #1407
2014-08-17 07:18:19 -06:00
Barry Steyn
b3b65d77e0 Documents DOCUTILS_SETTINGS and initializes it. Fixes #1425 2014-07-31 18:04:35 -07:00
Barry Steyn
a0ecab901f Allows Typogrify to ignore user specified tags. Refs #1407
Typogrify interferes with certain sections of the output that it should not touch (see #1407 for more details).
This feature adds a setting called TYPOGRIFY_IGNORE_LIST which is a list of tag for Typogrify to ignore.

The following was updated:

 1. readers.py - if TYPOGRIFY_IGNORE_TAGS is present, then use it
 2. settings.ps - default TYPOGRIFY_IGNORE_TAGS to []
 3. contents/article_with_code_block.rst - an article with a code block for typogrify to ignore
 4. updated tests
 5. updated documentation
2014-07-28 15:17:12 -07:00
Deniz Turgut
ed3209888a Refactor logging handling
Old system was using manual string formatting for log messages.
This caused issues with common operations like exception logging
because often they need to be handled differently for Py2/Py3
compatibility. In order to unify the effort:

 - All logging is changed to `logging.level(msg, arg1, arg2)` style.
 - A `SafeLogger` is implemented to auto-decode exceptions properly
in the args (ref #1403).
 - Custom formatters were overriding useful logging functionality
like traceback outputing (ref #1402). They are refactored to be
more transparent. Traceback information is provided in `--debug`
mode for `read_file` errors in generators.
 - Formatters will now auto-format multiline log messages in order
to make them look related. Similarly, traceback will be formatted in
the same fashion.
 - `pelican.log.LimitFilter` was (ab)using logging message which
would result in awkward syntax for argumented logging style. This
functionality is moved to `extra` keyword argument.
 - Levels for errors that would result skipping a file (`read_file`)
changed from `warning` to `error` in order to make them stand out
among other logs.
 - Small consistency changes to log messages (i.e. changing all
to start with an uppercase letter) and quality-of-life improvements
(some log messages were dumping raw object information).
2014-07-22 12:39:39 -04:00
Justin Mayer
2432a22400 Merge pull request #1322 from smartass101/get_files_multiple_paths
move {ARTICLE,PAGE}_DIR -> {ARTICLE,PAGE}_PATHS and correlate with {ARTICLE,PAGE}_EXCLUDES
2014-06-25 07:29:22 -07:00
Deniz Turgut
bf9316bb7e Remove AsciiDocReader from core. Fixes #1355 2014-06-14 02:17:43 -04:00
Mark Lee
b572cbeef1 Addressed comments from @avaris in PR getpelican/pelican#1348 2014-05-27 11:42:37 -07:00
Ondrej Grover
6aa0e4346d Add {PAGE,ARTICLE}_PATHS to {ARTICLE,PAGE}_EXCLUDES automatically
This makes it easier for someone to change PAGE_PATHS without the
need to change ARTICLE_EXCLUDES accordingly.
2014-05-14 14:30:21 +02:00
Ondrej Grover
21882fd4a0 Fix #1344 move PLUGIN_PATH -> PLUGIN_PATHS
Pelican uses *_PATHS names for settings that represent a list of paths.
2014-05-14 14:19:52 +02:00
Ondrej Grover
d635a347d1 move {ARTICLE,PAGE}_DIR -> {ARTICLE,PAGE}_PATHS
Instead of one path a list can be given. This is due to popular request.
Should help people not wanting to use Pelican for blogging.
Maintain backward compatibility though.
Thanks to @ingwinlu for pointing out the change in StaticGenerator.
2014-05-14 14:04:50 +02:00
Vincent Jousse
ebf0da0f7b Merge remote-tracking branch 'remotes/malept/davidmarble-page-order-by' into davidmarble-page-order-by
Conflicts:
	docs/settings.rst
	pelican/generators.py
	pelican/tests/test_generators.py
2014-05-14 10:48:41 +02:00
Ondrej Grover
5bad061c19 rename CACHE_DIR -> CACHE_PATH to unify with rest of Pelican
CACHE_PATH can now be relative to settings file like OUTPUT_PATH.
Also add --cache-path commandline option.
Change cache loading warning to a less scary and more helpful message.
2014-05-02 18:08:32 +02:00
Ondrej Grover
c1324b0206 split content caching into two layers
This is a reworked and improved version of content caching.
Notable changes:
- by default only raw content and metadata returned by readers are
  cached which should prevent conficts with plugins, the speed benefit
  of content objects caching is not very big with a simple setup
- renamed --full-rebuild to --ignore-cache
- added more elaborate logging to caching code
2014-04-20 14:34:52 +02:00
Shauna
e6be02264a Add feeds for each author 2014-04-18 14:29:18 -07:00
Justin Mayer
f0802e8114 Text tweaks for "PLUGIN_PATH as list" feature 2014-04-18 13:21:06 -07:00
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