1
0
Fork 0
forked from github/pelican

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.
This commit is contained in:
W. Trevor King 2013-01-05 08:42:50 -05:00
commit 0dee76f259
27 changed files with 31 additions and 34 deletions

View file

@ -81,7 +81,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="../static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="../pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
</div>
<a class="readmore" href="../oh-yeah.html">read more</a>

View file

@ -49,7 +49,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="../static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="../pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
</div>
<p>There are <a href="../oh-yeah.html#disqus_thread">comments</a>.</p> </article>
<p class="paginator">

View file

@ -47,8 +47,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="../static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="../static/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="../pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="../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()

View file

@ -10,8 +10,8 @@
&lt;div class="section" id="this-is-a-simple-title"&gt;
&lt;h2&gt;This is a simple title&lt;/h2&gt;
&lt;p&gt;And here comes the cool &lt;a class="reference external" href="http://books.couchdb.org/relax/design-documents/views"&gt;stuff&lt;/a&gt;.&lt;/p&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;pre class="literal-block"&gt;
&amp;gt;&amp;gt;&amp;gt; from ipdb import set_trace
&amp;gt;&amp;gt;&amp;gt; set_trace()
@ -22,7 +22,7 @@
&lt;h2&gt;Why not ?&lt;/h2&gt;
&lt;p&gt;After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
YEAH !&lt;/p&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;/div&gt;
</summary><category term="oh"></category><category term="bar"></category><category term="yeah"></category></entry><entry><title>Unbelievable !</title><link href="http://blog.notmyidea.org/unbelievable.html" rel="alternate"></link><updated>2010-10-15T20:30:00+02:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2010-10-15:unbelievable.html</id><summary type="html">&lt;p&gt;Or completely awesome. Depends the needs.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html"&gt;a root-relative link to markdown-article&lt;/a&gt;

View file

@ -12,8 +12,8 @@
&lt;div class="section" id="this-is-a-simple-title"&gt;
&lt;h2&gt;This is a simple title&lt;/h2&gt;
&lt;p&gt;And here comes the cool &lt;a class="reference external" href="http://books.couchdb.org/relax/design-documents/views"&gt;stuff&lt;/a&gt;.&lt;/p&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;pre class="literal-block"&gt;
&amp;gt;&amp;gt;&amp;gt; from ipdb import set_trace
&amp;gt;&amp;gt;&amp;gt; set_trace()
@ -24,7 +24,7 @@
&lt;h2&gt;Why not ?&lt;/h2&gt;
&lt;p&gt;After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
YEAH !&lt;/p&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;/div&gt;
</summary><category term="oh"></category><category term="bar"></category><category term="yeah"></category></entry><entry><title>Unbelievable !</title><link href="http://blog.notmyidea.org/unbelievable.html" rel="alternate"></link><updated>2010-10-15T20:30:00+02:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2010-10-15:unbelievable.html</id><summary type="html">&lt;p&gt;Or completely awesome. Depends the needs.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html"&gt;a root-relative link to markdown-article&lt;/a&gt;

View file

@ -12,8 +12,8 @@
&lt;div class="section" id="this-is-a-simple-title"&gt;
&lt;h2&gt;This is a simple title&lt;/h2&gt;
&lt;p&gt;And here comes the cool &lt;a class="reference external" href="http://books.couchdb.org/relax/design-documents/views"&gt;stuff&lt;/a&gt;.&lt;/p&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;pre class="literal-block"&gt;
&amp;gt;&amp;gt;&amp;gt; from ipdb import set_trace
&amp;gt;&amp;gt;&amp;gt; set_trace()
@ -24,7 +24,7 @@
&lt;h2&gt;Why not ?&lt;/h2&gt;
&lt;p&gt;After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
YEAH !&lt;/p&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;/div&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexis Métaireau</dc:creator><pubDate>Wed, 20 Oct 2010 10:14:00 +0200</pubDate><guid>tag:blog.notmyidea.org,2010-10-20:oh-yeah.html</guid><category>oh</category><category>bar</category><category>yeah</category></item><item><title>Unbelievable !</title><link>http://blog.notmyidea.org/unbelievable.html</link><description>&lt;p&gt;Or completely awesome. Depends the needs.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html"&gt;a root-relative link to markdown-article&lt;/a&gt;

View file

@ -3,6 +3,6 @@
&lt;h2&gt;Why not ?&lt;/h2&gt;
&lt;p&gt;After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
YEAH !&lt;/p&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;/div&gt;
</summary><category term="oh"></category><category term="bar"></category><category term="yeah"></category></entry></feed>

View file

@ -3,6 +3,6 @@
&lt;h2&gt;Why not ?&lt;/h2&gt;
&lt;p&gt;After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
YEAH !&lt;/p&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;/div&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexis Métaireau</dc:creator><pubDate>Wed, 20 Oct 2010 10:14:00 +0200</pubDate><guid>tag:blog.notmyidea.org,2010-10-20:oh-yeah.html</guid><category>oh</category><category>bar</category><category>yeah</category></item></channel></rss>

View file

@ -3,8 +3,8 @@
&lt;div class="section" id="this-is-a-simple-title"&gt;
&lt;h2&gt;This is a simple title&lt;/h2&gt;
&lt;p&gt;And here comes the cool &lt;a class="reference external" href="http://books.couchdb.org/relax/design-documents/views"&gt;stuff&lt;/a&gt;.&lt;/p&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;pre class="literal-block"&gt;
&amp;gt;&amp;gt;&amp;gt; from ipdb import set_trace
&amp;gt;&amp;gt;&amp;gt; set_trace()

View file

@ -3,8 +3,8 @@
&lt;div class="section" id="this-is-a-simple-title"&gt;
&lt;h2&gt;This is a simple title&lt;/h2&gt;
&lt;p&gt;And here comes the cool &lt;a class="reference external" href="http://books.couchdb.org/relax/design-documents/views"&gt;stuff&lt;/a&gt;.&lt;/p&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/static/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /&gt;
&lt;pre class="literal-block"&gt;
&amp;gt;&amp;gt;&amp;gt; from ipdb import set_trace
&amp;gt;&amp;gt;&amp;gt; set_trace()

View file

@ -132,7 +132,7 @@ as well as <strong>inline markup</strong>.</p>
<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="./static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="./pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
</div>
<a class="readmore" href="./oh-yeah.html">read more</a>

View file

@ -52,7 +52,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="./static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="./pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
</div>
</div><!-- /.entry-content -->

View file

@ -32,7 +32,7 @@
<h1 class="entry-title">This is a test page</h1>
<p>Just an image.</p>
<img alt="alternate text" src="../static/pictures/Fat_Cat.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="../pictures/Fat_Cat.jpg" style="width: 600px; height: 450px;" />
</section>
<section id="extras" class="body">

View file

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Before After
Before After

View file

@ -1,2 +1,2 @@
User-agent: *
Disallow: /static/pictures
Disallow: /pictures

View file

@ -104,7 +104,7 @@ as well as <strong>inline markup</strong>.</p>
<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="../static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="../pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
</div>
<a class="readmore" href="../oh-yeah.html">read more</a>

View file

@ -47,8 +47,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="../static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="../static/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="../pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="../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()

View file

@ -49,7 +49,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="../static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="../pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
</div>
<p>There are <a href="../oh-yeah.html#disqus_thread">comments</a>.</p> </article>
<p class="paginator">

View file

@ -49,7 +49,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="../static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="../pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
</div>
<p>There are <a href="../oh-yeah.html#disqus_thread">comments</a>.</p> </article>
<p class="paginator">

View file

@ -50,8 +50,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="./static/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="./static/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="./pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
<img alt="alternate text" src="./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()

View file

@ -1,2 +1,2 @@
User-agent: *
Disallow: /static/pictures
Disallow: /pictures

View file

@ -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