From 0dee76f2598336a70d3c4535fd49217566971a44 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 5 Jan 2013 08:42:50 -0500 Subject: [PATCH] samples: Remove EXTRA_PATH_METADATA entries for pictures I'd added them earlier to test that a configuration edit could preserve the original output locations. However, it is likely that you have quite a number of static files, and we shouldn't recommend listing explicit paths for all of them. With this configuration change, the pictures will be copied into the output directory using their original relative path (e.g. `pictures/Fat_Cat.jpg` without the `static`). Any |filename|-style links will be updated automatically. If you *want* the pictures to end up in a `static` directory, it's easier to just organize your source that way. --- .../output/custom/author/alexis-metaireau2.html | 2 +- pelican/tests/output/custom/category/bar.html | 2 +- pelican/tests/output/custom/category/yeah.html | 4 ++-- pelican/tests/output/custom/feeds/all-en.atom.xml | 6 +++--- pelican/tests/output/custom/feeds/all.atom.xml | 6 +++--- pelican/tests/output/custom/feeds/all.rss.xml | 6 +++--- pelican/tests/output/custom/feeds/bar.atom.xml | 2 +- pelican/tests/output/custom/feeds/bar.rss.xml | 2 +- pelican/tests/output/custom/feeds/yeah.atom.xml | 4 ++-- pelican/tests/output/custom/feeds/yeah.rss.xml | 4 ++-- pelican/tests/output/custom/index2.html | 2 +- pelican/tests/output/custom/oh-yeah.html | 2 +- .../output/custom/pages/this-is-a-test-page.html | 2 +- .../output/custom/{static => }/pictures/Fat_Cat.jpg | Bin .../output/custom/{static => }/pictures/Sushi.jpg | Bin .../custom/{static => }/pictures/Sushi_Macro.jpg | Bin pelican/tests/output/custom/robots.txt | 2 +- pelican/tests/output/custom/tag/bar.html | 2 +- pelican/tests/output/custom/tag/foobar.html | 4 ++-- pelican/tests/output/custom/tag/oh.html | 2 +- pelican/tests/output/custom/tag/yeah.html | 2 +- .../output/custom/this-is-a-super-article.html | 4 ++-- samples/content/extra/robots.txt | 2 +- samples/pelican.conf.py | 3 --- 24 files changed, 31 insertions(+), 34 deletions(-) rename pelican/tests/output/custom/{static => }/pictures/Fat_Cat.jpg (100%) rename pelican/tests/output/custom/{static => }/pictures/Sushi.jpg (100%) rename pelican/tests/output/custom/{static => }/pictures/Sushi_Macro.jpg (100%) diff --git a/pelican/tests/output/custom/author/alexis-metaireau2.html b/pelican/tests/output/custom/author/alexis-metaireau2.html index 23346f5b..9f4a31e8 100644 --- a/pelican/tests/output/custom/author/alexis-metaireau2.html +++ b/pelican/tests/output/custom/author/alexis-metaireau2.html @@ -81,7 +81,7 @@

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

-alternate text +alternate text read more diff --git a/pelican/tests/output/custom/category/bar.html b/pelican/tests/output/custom/category/bar.html index 2c1fc646..f7f1bbf3 100644 --- a/pelican/tests/output/custom/category/bar.html +++ b/pelican/tests/output/custom/category/bar.html @@ -49,7 +49,7 @@

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

-alternate text +alternate text

There are comments.

diff --git a/pelican/tests/output/custom/category/yeah.html b/pelican/tests/output/custom/category/yeah.html index 6894e3ee..f7cc8d12 100644 --- a/pelican/tests/output/custom/category/yeah.html +++ b/pelican/tests/output/custom/category/yeah.html @@ -47,8 +47,8 @@

This is a simple title

And here comes the cool stuff.

-alternate text -alternate text +alternate text +alternate text
 >>> from ipdb import set_trace
 >>> set_trace()
diff --git a/pelican/tests/output/custom/feeds/all-en.atom.xml b/pelican/tests/output/custom/feeds/all-en.atom.xml
index 5c8f9241..49d45cde 100644
--- a/pelican/tests/output/custom/feeds/all-en.atom.xml
+++ b/pelican/tests/output/custom/feeds/all-en.atom.xml
@@ -10,8 +10,8 @@
 <div class="section" id="this-is-a-simple-title">
 <h2>This is a simple title</h2>
 <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p>
-<img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
-<img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" />
+<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
+<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" />
 <pre class="literal-block">
 &gt;&gt;&gt; from ipdb import set_trace
 &gt;&gt;&gt; set_trace()
@@ -22,7 +22,7 @@
 <h2>Why not ?</h2>
 <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
 YEAH !</p>
-<img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
+<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
 </div>
 Unbelievable !2010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:unbelievable.html<p>Or completely awesome. Depends the needs.</p>
 <p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a>
diff --git a/pelican/tests/output/custom/feeds/all.atom.xml b/pelican/tests/output/custom/feeds/all.atom.xml
index ae5fe30c..3187c2aa 100644
--- a/pelican/tests/output/custom/feeds/all.atom.xml
+++ b/pelican/tests/output/custom/feeds/all.atom.xml
@@ -12,8 +12,8 @@
 <div class="section" id="this-is-a-simple-title">
 <h2>This is a simple title</h2>
 <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p>
-<img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
-<img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" />
+<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
+<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" />
 <pre class="literal-block">
 &gt;&gt;&gt; from ipdb import set_trace
 &gt;&gt;&gt; set_trace()
@@ -24,7 +24,7 @@
 <h2>Why not ?</h2>
 <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
 YEAH !</p>
-<img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
+<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
 </div>
 Unbelievable !2010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:unbelievable.html<p>Or completely awesome. Depends the needs.</p>
 <p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a>
diff --git a/pelican/tests/output/custom/feeds/all.rss.xml b/pelican/tests/output/custom/feeds/all.rss.xml
index 89176ac0..8d07bec7 100644
--- a/pelican/tests/output/custom/feeds/all.rss.xml
+++ b/pelican/tests/output/custom/feeds/all.rss.xml
@@ -12,8 +12,8 @@
 <div class="section" id="this-is-a-simple-title">
 <h2>This is a simple title</h2>
 <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p>
-<img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
-<img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" />
+<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
+<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" />
 <pre class="literal-block">
 &gt;&gt;&gt; from ipdb import set_trace
 &gt;&gt;&gt; set_trace()
@@ -24,7 +24,7 @@
 <h2>Why not ?</h2>
 <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
 YEAH !</p>
-<img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
+<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
 </div>
 Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:oh-yeah.htmlohbaryeahUnbelievable !http://blog.notmyidea.org/unbelievable.html<p>Or completely awesome. Depends the needs.</p>
 <p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a>
diff --git a/pelican/tests/output/custom/feeds/bar.atom.xml b/pelican/tests/output/custom/feeds/bar.atom.xml
index 9945f938..99b7cc45 100644
--- a/pelican/tests/output/custom/feeds/bar.atom.xml
+++ b/pelican/tests/output/custom/feeds/bar.atom.xml
@@ -3,6 +3,6 @@
 <h2>Why not ?</h2>
 <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
 YEAH !</p>
-<img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
+<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
 </div>
 
\ No newline at end of file
diff --git a/pelican/tests/output/custom/feeds/bar.rss.xml b/pelican/tests/output/custom/feeds/bar.rss.xml
index 148411be..94bd93f2 100644
--- a/pelican/tests/output/custom/feeds/bar.rss.xml
+++ b/pelican/tests/output/custom/feeds/bar.rss.xml
@@ -3,6 +3,6 @@
 <h2>Why not ?</h2>
 <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
 YEAH !</p>
-<img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
+<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
 </div>
 Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:oh-yeah.htmlohbaryeah
\ No newline at end of file
diff --git a/pelican/tests/output/custom/feeds/yeah.atom.xml b/pelican/tests/output/custom/feeds/yeah.atom.xml
index d2307359..1a152174 100644
--- a/pelican/tests/output/custom/feeds/yeah.atom.xml
+++ b/pelican/tests/output/custom/feeds/yeah.atom.xml
@@ -3,8 +3,8 @@
 <div class="section" id="this-is-a-simple-title">
 <h2>This is a simple title</h2>
 <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p>
-<img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
-<img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" />
+<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
+<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" />
 <pre class="literal-block">
 &gt;&gt;&gt; from ipdb import set_trace
 &gt;&gt;&gt; set_trace()
diff --git a/pelican/tests/output/custom/feeds/yeah.rss.xml b/pelican/tests/output/custom/feeds/yeah.rss.xml
index b252c26a..85f93686 100644
--- a/pelican/tests/output/custom/feeds/yeah.rss.xml
+++ b/pelican/tests/output/custom/feeds/yeah.rss.xml
@@ -3,8 +3,8 @@
 <div class="section" id="this-is-a-simple-title">
 <h2>This is a simple title</h2>
 <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p>
-<img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
-<img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" />
+<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
+<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" />
 <pre class="literal-block">
 &gt;&gt;&gt; from ipdb import set_trace
 &gt;&gt;&gt; set_trace()
diff --git a/pelican/tests/output/custom/index2.html b/pelican/tests/output/custom/index2.html
index 8ed54b6e..b8e2ac1a 100644
--- a/pelican/tests/output/custom/index2.html
+++ b/pelican/tests/output/custom/index2.html
@@ -132,7 +132,7 @@ as well as inline markup.

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

-alternate text +alternate text
read more diff --git a/pelican/tests/output/custom/oh-yeah.html b/pelican/tests/output/custom/oh-yeah.html index f9f1f1fb..2f6ca309 100644 --- a/pelican/tests/output/custom/oh-yeah.html +++ b/pelican/tests/output/custom/oh-yeah.html @@ -52,7 +52,7 @@

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

-alternate text +alternate text diff --git a/pelican/tests/output/custom/pages/this-is-a-test-page.html b/pelican/tests/output/custom/pages/this-is-a-test-page.html index 571211d9..b4cb678c 100644 --- a/pelican/tests/output/custom/pages/this-is-a-test-page.html +++ b/pelican/tests/output/custom/pages/this-is-a-test-page.html @@ -32,7 +32,7 @@

This is a test page

Just an image.

-alternate text +alternate text
diff --git a/pelican/tests/output/custom/static/pictures/Fat_Cat.jpg b/pelican/tests/output/custom/pictures/Fat_Cat.jpg similarity index 100% rename from pelican/tests/output/custom/static/pictures/Fat_Cat.jpg rename to pelican/tests/output/custom/pictures/Fat_Cat.jpg diff --git a/pelican/tests/output/custom/static/pictures/Sushi.jpg b/pelican/tests/output/custom/pictures/Sushi.jpg similarity index 100% rename from pelican/tests/output/custom/static/pictures/Sushi.jpg rename to pelican/tests/output/custom/pictures/Sushi.jpg diff --git a/pelican/tests/output/custom/static/pictures/Sushi_Macro.jpg b/pelican/tests/output/custom/pictures/Sushi_Macro.jpg similarity index 100% rename from pelican/tests/output/custom/static/pictures/Sushi_Macro.jpg rename to pelican/tests/output/custom/pictures/Sushi_Macro.jpg diff --git a/pelican/tests/output/custom/robots.txt b/pelican/tests/output/custom/robots.txt index ae5b0d05..19a6e299 100644 --- a/pelican/tests/output/custom/robots.txt +++ b/pelican/tests/output/custom/robots.txt @@ -1,2 +1,2 @@ User-agent: * -Disallow: /static/pictures +Disallow: /pictures diff --git a/pelican/tests/output/custom/tag/bar.html b/pelican/tests/output/custom/tag/bar.html index 2fed02c2..d1805e50 100644 --- a/pelican/tests/output/custom/tag/bar.html +++ b/pelican/tests/output/custom/tag/bar.html @@ -104,7 +104,7 @@ as well as inline markup.

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

-alternate text +alternate text read more diff --git a/pelican/tests/output/custom/tag/foobar.html b/pelican/tests/output/custom/tag/foobar.html index 71c2d430..2c50c8ae 100644 --- a/pelican/tests/output/custom/tag/foobar.html +++ b/pelican/tests/output/custom/tag/foobar.html @@ -47,8 +47,8 @@

This is a simple title

And here comes the cool stuff.

-alternate text -alternate text +alternate text +alternate text
 >>> from ipdb import set_trace
 >>> set_trace()
diff --git a/pelican/tests/output/custom/tag/oh.html b/pelican/tests/output/custom/tag/oh.html
index 361b1fd2..b798964e 100644
--- a/pelican/tests/output/custom/tag/oh.html
+++ b/pelican/tests/output/custom/tag/oh.html
@@ -49,7 +49,7 @@
 

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

-alternate text +alternate text

There are comments.

diff --git a/pelican/tests/output/custom/tag/yeah.html b/pelican/tests/output/custom/tag/yeah.html index 9bbd214b..54ad93c6 100644 --- a/pelican/tests/output/custom/tag/yeah.html +++ b/pelican/tests/output/custom/tag/yeah.html @@ -49,7 +49,7 @@

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

-alternate text +alternate text

There are comments.

diff --git a/pelican/tests/output/custom/this-is-a-super-article.html b/pelican/tests/output/custom/this-is-a-super-article.html index 000bd555..1fdd8897 100644 --- a/pelican/tests/output/custom/this-is-a-super-article.html +++ b/pelican/tests/output/custom/this-is-a-super-article.html @@ -50,8 +50,8 @@

This is a simple title

And here comes the cool stuff.

-alternate text -alternate text +alternate text +alternate text
 >>> from ipdb import set_trace
 >>> set_trace()
diff --git a/samples/content/extra/robots.txt b/samples/content/extra/robots.txt
index ae5b0d05..19a6e299 100644
--- a/samples/content/extra/robots.txt
+++ b/samples/content/extra/robots.txt
@@ -1,2 +1,2 @@
 User-agent: *
-Disallow: /static/pictures
+Disallow: /pictures
diff --git a/samples/pelican.conf.py b/samples/pelican.conf.py
index ad2042fd..4d5cd06d 100755
--- a/samples/pelican.conf.py
+++ b/samples/pelican.conf.py
@@ -37,9 +37,6 @@ DEFAULT_METADATA = (('yeah', 'it is'),)
 # 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'},
     }
 
 # static paths will be copied without parsing their contents