Commits

Anonymous committed 869046a

Adding the Atom feed.

Comments (0)

Files changed (4)

src/redhot2_couchdb.erl

 atom_map() ->
     "function(doc) { 
       if (doc.type == 'blog' & doc.published) { 
-        var summary = doc.html.substring(0,250) + '...';
+        var summary = doc.markdown.substring(0,250) + '...';
         var s = summary.replace(/&/g,'&amp;').replace(/\</g,'&lt;').replace(/\>/g,'&gt;');
         var e = '<entry>\n'+
                 ' <title>'+doc.title+'</title>\n'+

src/redhot2_inets.erl

      , {"/logout",    redhot2_web_logout}
      , {"/auth",      redhot2_web_auth}
      , {"/theme",     redhot2_web_theme}
+     , {"/atom",      redhot2_web_atom}
      , {"/nitrogen",  static_file}
      , {"/js",        static_file}
      , {"/css",       static_file}

src/redhot2_web_bwcompat.erl

         [_,"plink"|_] -> 
             % v.3 used /web/plink?id=.... for permalinks
             wf:redirect("/entry/"++wf:qs("id"));
+        [_,"atom"|_] -> 
+            redhot2_web_atom:main();
         _ -> 
             wf:redirect("/fixme_error_msg_here")
     end.

templates/grid.html

     <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/smoothness/jquery-ui.css" type="text/css" media="screen" charset="utf-8" />
     <link rel="stylesheet" href="/nitrogen/nitrogen.css" type="text/css" media="screen" charset="utf-8" />
     <link rel="stylesheet" href="/theme/style.css" type="text/css" media="screen" charset="utf-8" />
-    <!-- link rel="stylesheet" href="/css/digitalchili.css" type="text/css" media="screen" charset="utf-8" /> -->
+    <link rel="alternate" title="RedHotErlang Atom feed" href="http://www.redhoterlang.com/atom" type="application/atom+xml" />
   </head>
   <body>
     [[[page:layout()]]]