This commit is contained in:
Alexis Metaireau 2012-03-09 11:42:21 +01:00
commit a7cea63db6
17 changed files with 229 additions and 114 deletions

View file

@ -24,12 +24,7 @@ Basic settings
================================================ =====================================================
Setting name (default value) What does it do?
================================================ =====================================================
`ARTICLE_PERMALINK_STRUCTURE` (``''``) Empty by default. Enables some customization of URL
structure (see below for more detail).
`AUTHOR` Default author (put your name)
`CLEAN_URLS` (``False``) If set to `True`, the URLs will not be suffixed by
`.html`, so you will have to setup URL rewriting on
your web server.
`DATE_FORMATS` (``{}``) If you do manage multiple languages, you can
set the date formatting here. See "Date format and locales"
section below for details.
@ -79,16 +74,14 @@ Setting name (default value) What does it do?
.. [#] Default is the system locale.
Article permalink structure
---------------------------
URL Settings
------------
This setting allows you to output your articles sorted by date, provided that
you specify a format as specified below. This format follows the Python
``datetime`` directives:
* %Y: Year with century as a decimal number.
* %m: Month as a decimal number [01,12].
* %d: Day of the month as a decimal number [01,31].
You can customize the URL's and locations where files will be saved. The URL's and
SAVE_AS variables use python's format strings. These variables allow you to place
your articles in a location such as '{slug}/index.html' and link to then as
'{slug}' for clean urls. These settings give you the flexibility to place your
articles and pages anywhere you want.
Note: If you specify a datetime directive, it will be substituted using the
input files' date metadata attribute. If the date is not specified for a
@ -99,15 +92,42 @@ information.
Also, you can use other file metadata attributes as well:
* category: '%(category)s'
* author: '%(author)s'
* tags: '%(tags)s'
* date: '%(date)s'
* slug
* date
* lang
* author
* category
Example usage:
* '/%Y/%m/' will render something like '/2011/07/sample-post.html'.
* '/%Y/%(category)s/' will render something like '/2011/life/sample-post.html'.
* ARTICLE_URL = 'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/'
* ARTICLE_SAVE_AS = 'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/index.html'
This would save your articles in something like '/posts/2011/Aug/07/sample-post/index.html',
and the URL to this would be '/posts/2011/Aug/07/sample-post/'.
================================================ =====================================================
Setting name (default value) what does it do?
================================================ =====================================================
`ARTICLE_URL` ('{slug}.html') The URL to refer to an ARTICLE.
`ARTICLE_SAVE_AS` ('{slug}.html') The place where we will save an article.
`ARTICLE_LANG_URL` ('{slug}-{lang}.html') The URL to refer to an ARTICLE which doesn't use the
default language.
`ARTICLE_LANG_SAVE_AS` ('{slug}-{lang}.html' The place where we will save an article which
doesn't use the default language.
`PAGE_URL` ('pages/{slug}.html') The URL we will use to link to a page.
`PAGE_SAVE_AS` ('pages/{slug}.html') The location we will save the page.
`PAGE_LANG_URL` ('pages/{slug}-{lang}.html') The URL we will use to link to a page which doesn't
use the default language.
`PAGE_LANG_SAVE_AS` ('pages/{slug}-{lang}.html') The location we will save the page which doesn't
use the default language.
`AUTHOR_URL` ('author/{name}.html') The URL to use for an author.
`AUTHOR_SAVE_AS` ('author/{name}.html') The location to save an author.
`CATEGORY_URL` ('category/{name}.html') The URL to use for a category.
`CATEGORY_SAVE_AS` ('category/{name}.html') The location to save a category.
`TAG_URL` ('tag/{name}.html') The URL to use for a tag.
`TAG_SAVE_AS` ('tag/{name}.html') The location to save the tag page.
================================================ =====================================================
Timezone
--------