1
0
Fork 0
forked from github/pelican
Commit graph

2,318 commits

Author SHA1 Message Date
Ondrej Grover
9690a696b9 Mention the INDEX_SAVE_AS setting in FAQ and direct templates
This setting can be particularly useful when making a static homepage.
2014-11-03 15:43:32 +01:00
Justin Mayer
a81fcd3fef Merge pull request #1509 from foresto/static-files-anywhere
Make StaticGenerator skip content sources. Refs #1019.
2014-11-01 14:34:33 -07:00
Forest
48f4f0850d Make StaticGenerator skip content sources. Refs #1019.
This change partially addresses issue #1019, by teaching Pelican to distinguish
between static files and content source files. A user can now safely add the
same directory to both STATIC_PATHS and PAGE_PATHS (or ARTICLE_PATHS). Pelican
will then process the content source files in that directory normally, and
treat the remaining files as static, without copying the raw content source
files to the output directory. (The OUTPUT_SOURCES setting still works.)

In other words, images and markdown/reST files can now safely live together.

To keep those files together in the generated site, STATIC_SAVE_AS and
PAGE_SAVE_AS (or ARTICLE_SAVE_AS) should point to the same output directory.

There are two new configuration settings:

STATIC_EXCLUDES=[]  # This works just like PAGE_EXCLUDES and ARTICLE_EXCLUDES.
STATIC_EXCLUDE_SOURCES=True  # Set this to False to get the old behavior.

Two small but noteworthy internal changes:

StaticGenerator now runs after all the other generators. This allows it to see
which files are meant to be processed by other generators, and avoid them.

Generators now include files that they fail to process (e.g. those with missing
mandatory metadata) along with all the other paths in context['filenames'].
This allows such files to be excluded from StaticGenerator's file list, so they
won't end up accidentally published. Since these files have no Content object,
their value in context['filenames'] is None. The code that uses that dict has
been updated accordingly.
2014-10-31 16:46:01 -07:00
Justin Mayer
f9bd4acb10 Merge pull request #1511 from olivierverdier/makefile_tab
Fix missing tab in Makefile template
2014-10-22 16:00:39 -07:00
Olivier Verdier
5b389d6f36 fix missing tab in Makefile template 2014-10-20 15:22:11 +02:00
Justin Mayer
17c551c793 Merge pull request #1484 from ingwinlu/complete_rss_feed_removal
add missing author feeds to pelicanconf template
2014-10-10 11:15:33 -07:00
Kyle Fuller
7feb638b5c Merge pull request #1487 from foresto/spelling
Spelling correction in docs: usefull -> useful.
2014-10-04 19:27:38 +01:00
Forest
96eaf9cea0 Spelling correction in docs: usefull -> useful. 2014-10-01 02:05:49 -07:00
tylerhartley
693ad3296c EXTRA_PATH_METADATA path separator is OS-specific
Updating docs for EXTRA_PATH_METADATA to clarify that OS-specific path
separators must be used as keys, unlike some other Pelican variables.
Refs # 1133.
2014-09-30 10:40:26 -07:00
winlu
9b4b123a0e add missing author feeds to pelicanconf template 2014-09-29 23:38:39 +02:00
Justin Mayer
c7b52bc730 Merge pull request #1473 from ingwinlu/patch-1
Update faq.rst to include missing Author Feeds
2014-09-22 08:08:26 -07:00
winlu
e4a2bb5b52 Update faq.rst
since author feeds are enabled per default http://docs.getpelican.com/en/latest/settings.html#id9 as well, these need to be added here as well.
2014-09-22 16:36:34 +02:00
Justin Mayer
08d5221114 Merge pull request #1374 from singingwolfboy/readme-badges
README: Added Coveralls badge, refactor Travis badge
2014-09-19 07:59:34 -07:00
David Baumgold
683d10a480 README: Added Coveralls badge, refactor Travis badge 2014-09-19 10:47:31 -04:00
Justin Mayer
9bf22f20bf Merge pull request #1470 from avaris/fix_1348
Fix for broken test in #1348
2014-09-18 19:07:00 -07:00
Deniz Turgut
dec6023fe6 Fix for broken test in #1348 2014-09-18 20:09:12 -04:00
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
fbc65e0d7b Merge pull request #1366 from Scheirle/paginated_relative_urls_fix2
Fixes wrongly generated relative urls for pagination.
2014-09-18 16:15:21 -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
cb11bea1f2 Merge pull request #1408 from arty-name/feed-written
Add feed_written signal
2014-08-28 11:19:58 -07:00
Justin Mayer
1fae9534d5 Merge pull request #1446 from avaris/enhanced_strftime
Fixes #1395: extends pelican.utils.strftime with `-` prefix to strip leading zeros
2014-08-28 11:17:28 -07:00
Artemy Tregubenko
0093984861 Add feed_written signal 2014-08-28 20:09:42 +02:00
Justin Mayer
2b130fb4dd Merge pull request #1438 from mlissner/patch-2
Add reference to SLUGIFY_SOURCE
2014-08-23 13:05:20 -07:00
Justin Mayer
b357592248 Merge pull request #1445 from avaris/fix_1420
Fixes #1420: Handle multiple definitions of standard metadata for Markdown
2014-08-22 15:15:38 -07:00
Deniz Turgut
a2bb80b8bd Fixes #1420: Handle multiple definitions of standard metadata for Markdown 2014-08-22 17:53:36 -04: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
Mike Lissner
04978e9b75 Adds reference to SLUGIFY_SOURCE
When working on my site, I wanted SLUGIFY_SOURCE, but I came across PATH_METADATA first and enabled that for a while. Better to include the cross-reference where people can find it.
2014-08-16 21:07:30 -07:00
Justin Mayer
2ecd85d7b3 Merge pull request #1412 from avaris/refactor_logging
Refactor logging handling
2014-08-13 14:17:09 -07:00
Kyle Fuller
5563b9baf4 Merge pull request #1418 from willingc/fix-doc-typo
Corrected typo to improve readability
2014-08-03 00:53:07 +01:00
Justin Mayer
4261b9f5d0 Merge pull request #1371 from omasanori/tz
Add timezone to datetime objects. Refs #962.
2014-08-02 07:38:08 -07: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
Carol Willing
c995fa87a7 Corrected typo to improve readability 2014-07-27 07:33:05 -07:00
Ondrej Grover
3b54f3e418 Merge pull request #1415 from RR2DO2/patch-1
Debug print removal

the print() was a leftover from caching development.
2014-07-26 09:15:14 +02:00
RR2DO2
df0731f2e8 Debug print removal
The print either is a debug print that needs removing, or needs an additional description. The first is more likely.
2014-07-25 19:24:40 +01: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
f1a9d50a06 Merge pull request #1323 from DandyDev/access-reader-names
Reader name now accessible for articles and pages
2014-07-18 09:12:00 -07:00
Deniz Turgut
7c3cc8fc0d Fixes #1395: extends pelican.utils.strftime with - prefix to strip leading zeros
Adds the ability to use `-` prefix with C89 format codes to strip any
leading zeros.
2014-07-16 03:40:53 -04:00
Daan Debie
00434d4bb6 Reader name now accessible for articles and pages 2014-07-15 00:29:52 +02:00
Bernhard Scheirle
af0899ae2a Fixes wrongly generated relative urls for pagination.
When `RELATIVE_URLS` is `True` and the `PAGINATION_PATTERNS` adds folder to the path, the relative urls to these pages does not respect these additional folders.

Example:
	Settings:
			RELATIVE_URLS = True
			PAGINATION_PATTERNS = (
					(1, '{base_name}/', '{base_name}/index.html'),
					(2, '{base_name}/page/{number}/', '{base_name}/page/{number}/index.html'),)

	Theme:
			<link href="{{ SITEURL }}/theme/css/style.css" rel="stylesheet">

If you are on page 2 then "{{ SITEURL }}/theme/css/style.css" expands to "./theme/css/style.css" instead of "./../../theme/css/style.css".

Fix:
Simply compute the relative url from the paginated url instead of the not paginated one.
2014-07-12 21:10:42 +02:00
Kyle Fuller
a3c8fca1db Merge pull request #1372 from Railslide/make_github_commit_message
change make github commit message
2014-07-08 12:46:00 +01:00
Justin Mayer
8553ad6a59 Merge pull request #1392 from arty-name/patch-1
Remove extra backtick in settings documentation
2014-07-06 15:03:44 -07:00
Artemy Tregubenko
d35348830a removed extra backtick in settings documentation
``SLUG_SUBSTITUTIONS` = ()`` becomes ``SLUG_SUBSTITUTIONS = ()``
2014-07-06 23:20:19 +02:00
OGINO Masanori
2c50ccb764 Add timezone to datetime objects. Refs #962.
Based on https://github.com/getpelican/pelican/pull/977, but it adds
timezone information before formatting.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-07-04 01:23:57 +09:00
Justin Mayer
8d14872700 Merge pull request #1387 from eliben/fix-devserver-port
Fix "server didn't start" error message in develop_server.sh
2014-07-02 12:22:15 -07:00
Justin Mayer
e7eb3b8ec3 Increment development version to 3.5.dev 2014-07-01 16:03:02 -07:00
Justin Mayer
9b5261512d Revert setup.py changes. Ensure universal wheels. 3.4.0
Attempts at fancy version number handling in setup.py caused more
problems than they were worth, including Travis CI build failures.

The setup.cfg key for universal binary wheel generation apparently
changed at some point, so that was updated as well.
2014-07-01 14:33:04 -07:00
Justin Mayer
d41331bd69 Work around setup.py encoding issue in last commit 2014-07-01 13:48:16 -07:00
Justin Mayer
a47c0e26c0 Bump version 3.4.0 2014-07-01 13:34:47 -07:00
Justin Mayer
7e516cb7b0 setup.py version should inherit from __init.py__ 2014-07-01 13:33:24 -07:00