Anonymous avatar Anonymous committed 451f22e

replace old respondWith api by provides calls.

Comments (0)

Files changed (2)

   
   registerType("sitemap", "application/x-xml");
   
-  return respondWith(req, {
-    html: function() {
+  provides("html", function() {
         if (head) {
             return template(lib.templates.index.head, {
                 assets: assetPath(),
                 assets: assetPath()
             });
         }
-    },
-    atom: function() {
+    });
+
+    provides("atom", function() {
       // with first row in head you can do updated.
       if (head) {
         var f = <feed xmlns="http://www.w3.org/2005/Atom"/>;
       } else {
         return {body: "</feed>"};
       }
-    },
-    sitemap: function() {
+    });
+
+    provides("sitemap", function() {
       //sitemap
        if (head) {
         return {body:'<?xml version="1.0" encoding="UTF-8"?>\n'+
         return {body: "</urlset>"};
       }
 
-    }
-  })
+    });
+
 };
   var indexPath = listPath('index','recent-posts',{descending:true, limit:8});
   var feedPath = listPath('search','topics',{descending:true, limit:8, format:"atom"});
   var archivesPath = listPath('index','recent-posts',{descending:true, limit:25});
-  return respondWith(req, {
-    html: function() {
+  provides("html", function() {
         if (head) {
             return template(lib.templates.search.head, {
                 assets: assetPath(),
                 assets: assetPath()
             });
         }
-    },
-    atom: function() {
+  });
+  provides("atom", function() {
       // with first row in head you can do updated.
       if (head) {
         var f = <feed xmlns="http://www.w3.org/2005/Atom"/>;
       } else {
         return {body: "</feed>"};
       }
-    }
-  })
+  });
 };
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.