1
0
Fork 0
forked from github/pelican
Commit graph

68 commits

Author SHA1 Message Date
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
dff5b3589b Add per page templates. Closes #376
Also set up helper classes in test_generators.py for cleaner tests
2012-07-07 14:15:43 -07:00
dave mankoff
9fb5969c59 Allow settings to specify a summary length, optionally allowing unlimited summary length 2012-06-10 17:58:05 -04:00
Pavel Puchkin
19cfe00397 Checking for basestring isinstance, not (str, unicode) 2012-04-29 14:45:34 +11:00
Pavel Puchkin
898ac3808f Last fix? 2012-04-20 11:28:00 +11:00
Pavel Puchkin
9dcf612f9d Fixes after review 2012-04-18 23:07:57 +11:00
Pavel Puchkin
6116236ed9 *_SAVE_AS = None fix
Ability to disable creating some files when their `_SAVE_AS` setting is
set to none-value. Mostly for disabling creating of `authors` stuff
(when there only one user, see #320 for details)
2012-04-18 18:56:53 +11:00
Dafydd Crosby
28a1e0f432 Fix some typos and grammar 2012-04-07 18:02:40 -06:00
Alexis Metaireau
b845db30de Add a way to know what metadata exists.
This allows in a theme to have a look at the "metadata" attribute of a content
to know what are the metadata fields defined by it.
2012-04-03 11:58:31 +02:00
m-r-r
fc584969c9 patch for bug #271 (Unicode issue in category name) 2012-03-23 19:31:44 +01:00
Andrea Crotti
0922efa371 change the way logging is done, using the standard log tree instead of
calling the module-level functions on an unitialised logging object.

This allows to
- simplify log.py
- use one logger object for each file
2012-03-20 13:01:21 +00:00
Alexis Metaireau
4819a83003 Fix #171. Handle unicode filenames 2012-03-16 21:13:24 +01:00
Alexis Metaireau
c75ab513da use 'summary' rather than ':summary:' in comments 2012-03-16 19:59:03 +01:00
Simon
ff2426c4ad Fix for #245: return the summary of an article based on the :summary: metadata if it is set, else troncate the content. 2012-03-13 21:52:50 +01:00
draftcode
2827a6df47 Fixed some typos. 2012-03-12 01:22:54 +09:00
Alexis Metaireau
3bdc769134 Factorize some code about URL wrapping. 2012-03-11 01:14:22 +01:00
Alexis Metaireau
8a442e726a Don't specify the default when accessing settings.
There is no need to do this, since all the default values are already provided
in the default settings dict (in settings.py)
2012-03-09 16:22:28 +01:00
Alexis Metaireau
6cde7fd27a PEP8-ify.
Wrap to 80 chars, sanitize imports.
2012-03-09 16:21:38 +01:00
Bruno Binet
8bf0a22eb0 fix encoding errors
error was:codeEncodeError: 'ascii' codec can't encode character u'\xe9' [..]
2012-03-06 16:41:36 +00:00
Kyle Fuller
c5816c9c5a Make these patches compatible with upstream master 2012-03-06 16:41:36 +00:00
Kyle Fuller
44cf2ad400 Support configurable URL's & SAVE_AS path for Author, Category and Tag 2012-03-06 16:41:35 +00:00
Kyle Fuller
a39787c1a2 Add settings to change the URL's and SAVE_AS paths
Example usage:

* ARTICLE_URL = 'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/'
* ARTICLE_SAVE_AS = 'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/index.html'

This removes CLEAN_URLS and ARTICLE_PERMALINK_STRUCTURE because these
new settings can produce the same result.
2012-03-06 16:41:35 +00:00
Kyle Fuller
ff9c786149 Create a Author class which has a url property 2012-03-06 16:39:07 +00:00
Kyle Fuller
f9ed01bb64 Create a Tag class which has a url property 2012-03-06 16:39:07 +00:00
Kyle Fuller
6754099730 Create a Category class which has a url property 2012-03-06 16:39:07 +00:00
Stéphane Raimbault
9cced6be83 Sort imports and remove trailing whitespaces 2012-02-28 17:40:13 +01:00
Jiachen Yang
189d72e989 Merge remote-tracking branch 'ametaireau/master' into localedate 2012-02-28 01:43:50 +09:00
Jiachen Yang
e78372f338 import unittest if cannot found unittest2 2012-02-28 01:43:36 +09:00
Jiachen Yang
d1d82db4f7 Change date_format to support (locale,format) 2012-02-26 16:35:04 +09:00
Martin Brochhaus
67472298ca Added changes as per codereview. 2012-02-20 17:58:23 +01:00
Martin Brochhaus
52fb81a441 Added some fixes to the test suite so that it doesn't fail any more. 2012-02-20 17:39:47 +01:00
Kyle Fuller
256b92e5c4 Fix CLEAN_URLS and place articles in <slug>/index.html 2011-12-13 23:30:27 +00:00
Jökull Sólberg Auðunsson
dc22d2b131 Added WITH_FUTURE_DATES settings, which if true treats future dated content as drafts. 2011-11-26 23:23:19 +00:00
Jökull Sólberg Auðunsson
082cc2a401 Warning string formatting needs unicode if filename is utf-8 2011-11-26 22:31:43 +00:00
Skami18
b9157df1a3 Fixes the bug re-introduced in 0b6896a. Thank to @mapio for noticing the problem :-) 2011-10-29 12:57:15 +02:00
Skami18
0b6896a0ab Adding a summary no more make Pelican crashes
Setting pelican.readers.Article.summary was impossible and raised an
exception because pelican.readers.Article.summary was a @property
2011-10-25 18:31:17 +02:00
Massimo Santini
5bcc56fed8 elativize URLs in summary as we do for content (this time by rewriting summary as a property to defer the access to content when URLs in it have been relativized by the writer). 2011-10-04 07:43:26 +02:00
Massimo Santini
8b36f90db9 Revert "Relativize URLs in summary as we do for content"
This reverts commit 5a993de400.
2011-10-04 07:31:21 +02:00
Massimo Santini
5a993de400 Relativize URLs in summary as we do for content 2011-10-03 16:11:42 +02:00
renhbo
eea6c7477d Fix an unicode error on Windows platform. 2011-08-19 02:19:44 +08:00
Skami18
b892f758a8 Pelican show a warning instead of raising an exception if the author of an article is not found an there is no settings file 2011-07-26 17:45:15 +02:00
Alexis Metaireau
371892ceaa Merge branch tests into main. (See #44)
Conflicts:
	pelican/contents.py
	pelican/settings.py
	samples/pelican.conf.py
2011-05-10 23:18:11 +01:00
Alexis Metaireau
6b44d93780 Add the possibility to publish drafts. Fixes #111 2011-05-08 14:58:57 +01:00
Alexis Metaireau
3641703a49 Merge branch 'master' of github.com:ametaireau/pelican 2011-05-07 22:53:06 +01:00
Alexis Metaireau
52f2a8383a Metadata, not metadatas. 2011-05-07 20:00:30 +01:00
Alexis Metaireau
56effc24cb Add a DEFAULT_METADATA setting.
It is now possible to have soem default metadata defined in the settings. Fixes #98
2011-05-07 19:56:55 +01:00
Mikhail Korobov
3a301b1859 Python 2.5 compatibility 2011-05-06 16:45:27 +06:00
Mikhail Korobov
06246557c5 A couple of docstrings are fixed (they were refering obsolete params) 2011-05-06 16:44:12 +06:00
Skami18
3166e6dfe3 Calls to «print» replaced by the «pelican.log» module. 2011-04-19 14:49:46 +02:00
Marcus Fredriksson
f9123a4cc6 Binds the summary property to the current instance
An unbound property will just return itself instead of calling the intended
method.
2011-03-09 12:21:15 +01:00