forked from github/pelican
Remove Atom summaries when they are unnecessary
Do not include a summary tag to Atom entries when: - the summary is empty - the summary and the full content are the same Fixes #2403
This commit is contained in:
parent
6f0743b340
commit
1b8a7826c4
22 changed files with 122 additions and 274 deletions
|
|
@ -1,20 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom"><title>A Pelican Blog</title><link href="/" rel="alternate"></link><link href="/feeds/all.atom.xml" rel="self"></link><id>/</id><updated>2013-11-17T23:29:00+00:00</updated><entry><title>FILENAME_METADATA example</title><link href="/filename_metadata-example.html" rel="alternate"></link><published>2012-11-30T00:00:00+00:00</published><updated>2012-11-30T00:00:00+00:00</updated><author><name></name></author><id>tag:None,2012-11-30:/filename_metadata-example.html</id><summary type="html"><p>Some cool stuff!</p>
|
||||
</summary><content type="html"><p>Some cool stuff!</p>
|
||||
</content></entry><entry><title>Second article</title><link href="/second-article.html" rel="alternate"></link><published>2012-02-29T00:00:00+00:00</published><updated>2012-02-29T00:00:00+00:00</updated><author><name></name></author><id>tag:None,2012-02-29:/second-article.html</id><summary type="html"><p>This is some article, in english</p>
|
||||
</summary><content type="html"><p>This is some article, in english</p>
|
||||
</content><category term="foo"></category><category term="bar"></category><category term="baz"></category></entry><entry><title>Deuxième article</title><link href="/second-article-fr.html" rel="alternate"></link><published>2012-02-29T00:00:00+00:00</published><updated>2012-02-29T00:00:00+00:00</updated><author><name></name></author><id>tag:None,2012-02-29:/second-article-fr.html</id><summary type="html"><p>Ceci est un article, en français.</p>
|
||||
</summary><content type="html"><p>Ceci est un article, en français.</p>
|
||||
</content><category term="foo"></category><category term="bar"></category><category term="baz"></category></entry><entry><title>A markdown powered article</title><link href="/a-markdown-powered-article.html" rel="alternate"></link><published>2011-04-20T00:00:00+00:00</published><updated>2011-04-20T00:00:00+00:00</updated><author><name></name></author><id>tag:None,2011-04-20:/a-markdown-powered-article.html</id><summary type="html"><p>You're mutually oblivious.</p>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom"><title>A Pelican Blog</title><link href="/" rel="alternate"></link><link href="/feeds/all.atom.xml" rel="self"></link><id>/</id><updated>2013-11-17T23:29:00+00:00</updated><entry><title>FILENAME_METADATA example</title><link href="/filename_metadata-example.html" rel="alternate"></link><published>2012-11-30T00:00:00+00:00</published><updated>2012-11-30T00:00:00+00:00</updated><author><name></name></author><id>tag:None,2012-11-30:/filename_metadata-example.html</id><content type="html"><p>Some cool stuff!</p>
|
||||
</content></entry><entry><title>Second article</title><link href="/second-article.html" rel="alternate"></link><published>2012-02-29T00:00:00+00:00</published><updated>2012-02-29T00:00:00+00:00</updated><author><name></name></author><id>tag:None,2012-02-29:/second-article.html</id><content type="html"><p>This is some article, in english</p>
|
||||
</content><category term="foo"></category><category term="bar"></category><category term="baz"></category></entry><entry><title>Deuxième article</title><link href="/second-article-fr.html" rel="alternate"></link><published>2012-02-29T00:00:00+00:00</published><updated>2012-02-29T00:00:00+00:00</updated><author><name></name></author><id>tag:None,2012-02-29:/second-article-fr.html</id><content type="html"><p>Ceci est un article, en français.</p>
|
||||
</content><category term="foo"></category><category term="bar"></category><category term="baz"></category></entry><entry><title>A markdown powered article</title><link href="/a-markdown-powered-article.html" rel="alternate"></link><published>2011-04-20T00:00:00+00:00</published><updated>2011-04-20T00:00:00+00:00</updated><author><name></name></author><id>tag:None,2011-04-20:/a-markdown-powered-article.html</id><content type="html"><p>You're mutually oblivious.</p>
|
||||
<p><a href="/unbelievable.html">a root-relative link to unbelievable</a>
|
||||
<a href="/unbelievable.html">a file-relative link to unbelievable</a></p></summary><content type="html"><p>You're mutually oblivious.</p>
|
||||
<p><a href="/unbelievable.html">a root-relative link to unbelievable</a>
|
||||
<a href="/unbelievable.html">a file-relative link to unbelievable</a></p></content></entry><entry><title>Article 1</title><link href="/article-1.html" rel="alternate"></link><published>2011-02-17T00:00:00+00:00</published><updated>2011-02-17T00:00:00+00:00</updated><author><name></name></author><id>tag:None,2011-02-17:/article-1.html</id><summary type="html"><p>Article 1</p>
|
||||
</summary><content type="html"><p>Article 1</p>
|
||||
</content></entry><entry><title>Article 2</title><link href="/article-2.html" rel="alternate"></link><published>2011-02-17T00:00:00+00:00</published><updated>2011-02-17T00:00:00+00:00</updated><author><name></name></author><id>tag:None,2011-02-17:/article-2.html</id><summary type="html"><p>Article 2</p>
|
||||
</summary><content type="html"><p>Article 2</p>
|
||||
</content></entry><entry><title>Article 3</title><link href="/article-3.html" rel="alternate"></link><published>2011-02-17T00:00:00+00:00</published><updated>2011-02-17T00:00:00+00:00</updated><author><name></name></author><id>tag:None,2011-02-17:/article-3.html</id><summary type="html"><p>Article 3</p>
|
||||
</summary><content type="html"><p>Article 3</p>
|
||||
<a href="/unbelievable.html">a file-relative link to unbelievable</a></p></content></entry><entry><title>Article 1</title><link href="/article-1.html" rel="alternate"></link><published>2011-02-17T00:00:00+00:00</published><updated>2011-02-17T00:00:00+00:00</updated><author><name></name></author><id>tag:None,2011-02-17:/article-1.html</id><content type="html"><p>Article 1</p>
|
||||
</content></entry><entry><title>Article 2</title><link href="/article-2.html" rel="alternate"></link><published>2011-02-17T00:00:00+00:00</published><updated>2011-02-17T00:00:00+00:00</updated><author><name></name></author><id>tag:None,2011-02-17:/article-2.html</id><content type="html"><p>Article 2</p>
|
||||
</content></entry><entry><title>Article 3</title><link href="/article-3.html" rel="alternate"></link><published>2011-02-17T00:00:00+00:00</published><updated>2011-02-17T00:00:00+00:00</updated><author><name></name></author><id>tag:None,2011-02-17:/article-3.html</id><content type="html"><p>Article 3</p>
|
||||
</content></entry><entry><title>This is a super article !</title><link href="/this-is-a-super-article.html" rel="alternate"></link><published>2010-12-02T10:14:00+00:00</published><updated>2013-11-17T23:29:00+00:00</updated><author><name>Alexis Métaireau</name></author><id>tag:None,2010-12-02:/this-is-a-super-article.html</id><summary type="html"><p class="first last">Multi-line metadata should be supported
|
||||
as well as <strong>inline markup</strong>.</p>
|
||||
</summary><content type="html"><p>Some content here !</p>
|
||||
|
|
@ -29,13 +21,7 @@ as well as <strong>inline markup</strong>.</p>
|
|||
</pre>
|
||||
<p>→ And now try with some utf8 hell: ééé</p>
|
||||
</div>
|
||||
</content><category term="foo"></category><category term="bar"></category><category term="foobar"></category></entry><entry><title>Oh yeah !</title><link href="/oh-yeah.html" rel="alternate"></link><published>2010-10-20T10:14:00+00:00</published><updated>2010-10-20T10:14:00+00:00</updated><author><name>Alexis Métaireau</name></author><id>tag:None,2010-10-20:/oh-yeah.html</id><summary type="html"><div class="section" id="why-not">
|
||||
<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="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
|
||||
</div>
|
||||
</summary><content type="html"><div class="section" id="why-not">
|
||||
</content><category term="foo"></category><category term="bar"></category><category term="foobar"></category></entry><entry><title>Oh yeah !</title><link href="/oh-yeah.html" rel="alternate"></link><published>2010-10-20T10:14:00+00:00</published><updated>2010-10-20T10:14:00+00:00</updated><author><name>Alexis Métaireau</name></author><id>tag:None,2010-10-20:/oh-yeah.html</id><content type="html"><div class="section" id="why-not">
|
||||
<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>
|
||||
|
|
@ -85,6 +71,5 @@ pelican.conf, it will have nothing in default.</p>
|
|||
</pre></div>
|
||||
<p>Lovely.</p>
|
||||
</div>
|
||||
</content></entry><entry><title>The baz tag</title><link href="/tag/baz.html" rel="alternate"></link><published>2010-03-14T00:00:00+00:00</published><updated>2010-03-14T00:00:00+00:00</updated><author><name></name></author><id>tag:None,2010-03-14:/tag/baz.html</id><summary type="html"><p>This article overrides the listening of the articles under the <em>baz</em> tag.</p>
|
||||
</summary><content type="html"><p>This article overrides the listening of the articles under the <em>baz</em> tag.</p>
|
||||
</content></entry><entry><title>The baz tag</title><link href="/tag/baz.html" rel="alternate"></link><published>2010-03-14T00:00:00+00:00</published><updated>2010-03-14T00:00:00+00:00</updated><author><name></name></author><id>tag:None,2010-03-14:/tag/baz.html</id><content type="html"><p>This article overrides the listening of the articles under the <em>baz</em> tag.</p>
|
||||
</content></entry></feed>
|
||||
Loading…
Add table
Add a link
Reference in a new issue