From 7de7bd0e3715f2227ce84fcf198dcc98cc3a0582 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 5 Jan 2013 07:43:11 -0500 Subject: [PATCH] Update sample configurations from FILES_TO_COPY to EXTRA_PATH_METADATA --- pelican/tests/default_conf.py | 13 +++++++++---- samples/pelican.conf.py | 16 ++++++++++++---- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/pelican/tests/default_conf.py b/pelican/tests/default_conf.py index bc3a7dff..80a990b5 100644 --- a/pelican/tests/default_conf.py +++ b/pelican/tests/default_conf.py @@ -29,11 +29,16 @@ SOCIAL = (('twitter', 'http://twitter.com/ametaireau'), # global metadata to all the contents DEFAULT_METADATA = (('yeah', 'it is'),) -# static paths will be copied under the same name -STATIC_PATHS = ["pictures", ] +# path-specific metadata +EXTRA_PATH_METADATA = { + 'extra/robots.txt': {'path': 'robots.txt'}, + } -# A list of files to copy from the source to the destination -FILES_TO_COPY = (('extra/robots.txt', 'robots.txt'),) +# static paths will be copied without parsing their contents +STATIC_PATHS = [ + 'pictures', + 'extra/robots.txt', + ] # foobar will not be used, because it's not in caps. All configuration keys # have to be in caps diff --git a/samples/pelican.conf.py b/samples/pelican.conf.py index 70edd5f8..ad2042fd 100755 --- a/samples/pelican.conf.py +++ b/samples/pelican.conf.py @@ -34,11 +34,19 @@ SOCIAL = (('twitter', 'http://twitter.com/ametaireau'), # global metadata to all the contents DEFAULT_METADATA = (('yeah', 'it is'),) -# static paths will be copied under the same name -STATIC_PATHS = ["pictures", ] +# path-specific metadata +EXTRA_PATH_METADATA = { + 'extra/robots.txt': {'path': 'robots.txt'}, + 'pictures/Fat_Cat.jpg': {'path': 'static/pictures/Fat_Cat.jpg'}, + 'pictures/Sushi.jpg': {'path': 'static/pictures/Sushi.jpg'}, + 'pictures/Sushi_Macro.jpg': {'path': 'static/pictures/Sushi_Macro.jpg'}, + } -# A list of files to copy from the source to the destination -FILES_TO_COPY = (('extra/robots.txt', 'robots.txt'),) +# static paths will be copied without parsing their contents +STATIC_PATHS = [ + 'pictures', + 'extra/robots.txt', + ] # custom page generated with a jinja2 template TEMPLATE_PAGES = {'pages/jinja2_template.html': 'jinja2_template.html'}