Skip to content

Instantly share code, notes, and snippets.

@nfriedli
Created August 4, 2016 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nfriedli/ee2f01164262614da6dd1b360843b69b to your computer and use it in GitHub Desktop.
Save nfriedli/ee2f01164262614da6dd1b360843b69b to your computer and use it in GitHub Desktop.
Facebook Instant Articles for SPIP
[(#HTTP_HEADER{Content-type: text/xml[; charset=(#CHARSET)]})]<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>[(#NOM_SITE_SPIP|textebrut|texte_backend)]</title>
<link>#URL_SITE_SPIP/</link>
<description>[(#DESCRIPTIF_SITE_SPIP|supprimer_tags|texte_backend)]</description>
<language>#LANG</language>
<lastBuildDate><BOUCLE_maj(ARTICLES){!par date}{0,1}>[(#DATE_MODIF|date_iso)]</BOUCLE_maj></lastBuild>
<BOUCLE_articles(ARTICLES){!par date}{age < 2}>
<item>
<title>[(#TITRE|textebrut)]</title>
<link>[(#URL_ARTICLE|url_absolue)]</link>
<pubDate>[(#DATE_MODIF|date_iso)]</pubDate>
<author>Nicolas Friedli</author>
<description>[(#INTRODUCTION{150}|attribut_html)]</description>
<content:encoded>
<![CDATA[
<!doctype html>
<html lang="fr" prefix="op: http://media.facebook.com/op#">
<head>
<meta charset="utf-8">
<link rel="canonical" href="[(#URL_ARTICLE|url_absolue)]">
<meta property="op:markup_version" content="v1.0">
</head>
<body>
<article>
<header>
[<p>(#SURTITRE)</p>]
<h1>#TITRE</h1>
[<h2>(#SOUSTITRE)</h2>]
</header>
[<div class="#EDIT{chapo} chapo surlignable">(#CHAPO|liens_absolus|image_reduire{672,*})</div>]
[<div class="#EDIT{texte} texte surlignable clearfix">(#TEXTE|liens_absolus|image_reduire{672,*})</div>]
<footer>
[<div class="#EDIT{ps} ps surlignable"><hr />(#PS|liens_absolus|image_reduire{672,*})</div>]
</footer>
</article>
</body>
</html>
]]>
</content:encoded>
</item>
</BOUCLE_articles>
</channel>
</rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment