Commit graph

1,628 commits

Author SHA1 Message Date
Alexis Metaireau
c1272bc69d Merge pull request #781 from fe-lix-/master
Getting an explicit error message on server creation
2013-03-22 00:38:20 -07: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
Alexis Metaireau
5894624e2e Merge pull request #792 from cdelston/master
Fix simple template article permalink in article page.
2013-03-22 00:32:44 -07:00
Justin Mayer
167128b1f2 Merge pull request #794 from wking/static-reader
Use the static format to read Static metadata
2013-03-21 11:26:22 -07:00
W. Trevor King
29cdb37af3 generators: Use the static format to read Static metadata
This cuts down on the remaining difference between static files and
articles/pages.  The main difference is that path-based metadata is
now parsed for static content.
2013-03-21 14:17:50 -04:00
W. Trevor King
f147d9ec4a readers: Add 'static' to the base Reader's extensions
Instead of just being a base class, we can use it to parse static
files.  It won't actually do any parsing, but we will get path
metadata extraction from read_file, and this will make the
StaticGenerator implementation simpler.
2013-03-21 13:03:54 -04:00
Justin Mayer
90822de962 Merge pull request #768 from wking/path-handling-cleanup
Cleanup path handling (os.path.join and more)
2013-03-21 09:58:12 -07:00
W. Trevor King
ae4fc5a25e utils: Add path_to_url() and generalize get_relative_path()
The old get_relative_path() implementation assumed os.sep == '/',
which doesn't hold on MS Windows.  The new implementation uses
split_all() for a more general component count.

I added path_to_url(), because the:

  '/'.join(split_all(path))

idiom was showing up in a number of cases, and it's easier to
understand what's going on when that reads:

  path_to_url(path)

This will fix a number of places where I think paths and URLs were
conflated, and should improve MS Windows support.
2013-03-21 12:44:44 -04: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
Justin Mayer
4e5454912f Merge pull request #791 from wraithan/add_some_help
Add help directly to publishconf.py
2013-03-21 05:09:02 -07:00
Chris Elston
173e17d992 Simple theme article permalink missing SITEURL
This change modifies the simple template so that the SITEURL
prefix is added to the article permalink found within the article
page itself.
2013-03-21 11:28:06 +00:00
Wraithan (Chris McDonald)
5fcb18ea60 Add help directly to publishconf.py 2013-03-21 03:33:32 -07:00
David Beitey
1ff16f248b Raise exceptions from the autoreload loop if debug is enabled 2013-03-21 15:52:42 +10:00
Justin Mayer
c7f06b9af6 Merge pull request #786 from noirbizarre/more-documentation
Add missing documentation for JINJA_FILTERS and SITESUBTITLE
2013-03-20 13:29:13 -07:00
Axel Haustant
e235cadda4 Fix typos 2013-03-20 21:21:47 +01:00
Justin Mayer
439b783a72 Merge pull request #785 from wraithan/docs_for_ignore_files
documentation for IGNORE_FILES
2013-03-20 09:07:58 -07:00
Justin Mayer
043b9a52d6 Merge pull request #779 from johnmastro/add-period-archives
Add period archives
2013-03-20 08:09:39 -07:00
Axel Haustant
7fb51e94bb Fix typos 2013-03-20 16:08:54 +01:00
Axel Haustant
c36fce8b6a Added missing SITESUBTITLE documentation 2013-03-19 14:58:35 +01:00
Axel Haustant
c6b943bfe9 Added missing JINJA_FILTERS documentation 2013-03-19 14:58:35 +01:00
Félix Delval
66aae01493 Adding a message for gracefully shutting down dev server 2013-03-19 12:15:58 +01:00
Wraithan (Chris McDonald)
e73f7e9f84 documentation for IGNORE_FILES 2013-03-18 17:51:17 -07:00
Justin Mayer
9eda0f79bd External resources should be scheme-independent
By using "//" instead of "http://" when referring to external resources
such as fonts (e.g., from within CSS files), warnings about "insecure"
content can be avoided.
2013-03-18 17:36:35 -07:00
Félix Delval
7fa0d3063d Creating a more explicit error message at server creation 2013-03-16 19:29:10 +01:00
John Mastro
f92c800216 Add a period archives feature and brief docs.
Allows users to have per-year, per-month, and per-day archives of posts
automatically generated. The feature is disabled by default; to enable
it a user must supply format strings for a period's respective
`_SAVE_AS` setting.
2013-03-15 17:22:42 -07:00
Alexis Metaireau
c3e9d0e96e Merge pull request #771 from wking/urlwrapper-repr
contents: Add URLWrapper.__repr__
2013-03-14 10:55:45 -07:00
W. Trevor King
9a62b5ec62 contents: Add URLWrapper.__repr__
This makes it easier to troubleshoot collections of URLWrappers,
because printing the collection will give you something you can
actually read ;).
2013-03-12 20:41:56 -04:00
W. Trevor King
bfa8851af0 Add the PATH_METADATA setting
Sometimes the base filename doesn't have everything you need.

Remember that os.sep is platform dependent, so using it in a regular
expression for this setting may not be portable (boo MS Windows!).
2013-03-12 15:16:25 -07:00
W. Trevor King
c46ca5d5d1 readers: Split parse_path_metadata from read_file
For easier re-use.  I also extract the path metadata first, so
metadata explicitly listed in the file contents will take precedence
over metadata parsed from the filename.
2013-03-12 15:16:25 -07:00
Alexis Métaireau
12c43b7d4d Make METADATA_PROCESSORS and EXTENSIONS public. 2013-03-12 12:19:53 -07:00
Alexis Métaireau
fc45d8d791 update the docs regarding all_articles 2013-03-11 23:11:21 -07:00
Alexis Métaireau
14d548fc44 Introduce all_articles where articles is shadowed. 2013-03-11 23:07:54 -07:00
William Light
e045515b91 add "output_file" Jinja context variable
"output_file" contains the name of the HTML file that pelican is
currently rendering.
2013-03-10 23:53:41 -07:00
Alexis Métaireau
37f6190c69 URLWrapper moved! 2013-03-10 23:42:08 -07:00
tehkonst
ab035795bc fix slug for feed urls
Conflicts:

	pelican/contents.py
2013-03-10 23:41:02 -07:00
W. Trevor King
33c60a78cd pelican/utils: Add split_all() and rework static URL generation
I think the conversion from native paths to URLs is best put off until
we are actually trying to generate the URL.  The old handling
(introduced in 2692586, Fixes #645 - Making cross-content linking
windows compatible, 2012-12-19) converted the path at StaticContent
initialization, which left you with a bogus StaticContent.src.

Once we drop the 'static' subdirectory, we will be able to drop the
`dest` and `url` parts from the StaticGenerator.generate_context()
handling, which will leave things looking a good deal cleaner than
they do now.
2013-03-10 23:21:38 -07:00
W. Trevor King
49bf80ec39 contents: Convert StaticContent to Static, a Page subclass
Static needs a lot of the same handling as other pages, so make it a
subclass of Page.  The rename from StaticContent to Static makes for
cleaner configuration settings (STATIC_URL instead of
STATICCONTENT_URL).

All currently generated Static instances override the save_as
attribute explicitly on initialization, but it isn't hard to imagine
wanting to adjust STATIC file output based on metadata (e.g. extracted
from their source filename).  With this union, the framework for
manipulating URLs and filenames is shared between all source file
types.
2013-03-10 23:19:56 -07:00
Alexis Métaireau
9cbf5c0cbe deactivate travis for now 2013-03-10 23:11:41 -07:00
Alexis Métaireau
c6856dec44 Replace \ with / when replacing the URLs. See #763 2013-03-10 23:09:43 -07:00
Alexis Métaireau
14cf5f014c Some doc + various enhancements 2013-03-10 22:57:08 -07:00
Alexis Métaireau
5aeca4826c Use comments in tests, not docstrings. 2013-03-10 22:42:46 -07:00
Alexis Métaireau
fa77c3d66a This should be a warning, not an error :) 2013-03-10 22:30:36 -07:00
Alexis Métaireau
b9e2825da6 Put ASCII-art tree into a code-block element.
Fix #766
2013-03-10 20:15:37 -07:00
Alexis Metaireau
14f11f8561 Merge pull request #753 from wking/contribute-docs-rename
docs/contribute.rst: Update tests/output generation for moved tests
2013-03-10 12:27:45 -07:00
Alexis Metaireau
61dc53a7e0 Merge pull request #765 from jeredboxman/master
Added clearification in docs for PAGE_SAVE_AS
2013-03-10 12:23:06 -07:00
Jered Boxman
bfaa5f9d5c Added clearification in docs for PAGE_SAVE_AS
I discussed this option in the IRC channel, because I don't think it's
very clear. When I first read the list of options I was under the
impression that Pelican could do rewriting of urls. I discovered that
this isn't the case, so I discusses this in the IRC channel and got the
encouragement to submit a pull request.
2013-03-10 14:34:17 +01:00
Alexis Metaireau
71d437df62 Merge pull request #762 from tthurman/master
Fix stopserver command
2013-03-10 01:08:55 -08:00
Alexis Metaireau
3c5d819736 Merge pull request #764 from talha131/master
Fixes the reST syntax of an example in the docs
2013-03-10 01:08:14 -08:00