diff piecrust/dataproviders/blog.py @ 905:1d0364614665

internal: Sources can cache their pages in addition to their items. Added `getAllPages` to content sources to prevent having to look up cached page objects in the page repository all the time.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 23 Jul 2017 08:26:57 -0700
parents f4608e2e80ce
children 45ad976712ec
line wrap: on
line diff
--- a/piecrust/dataproviders/blog.py	Sun Jul 23 08:25:45 2017 -0700
+++ b/piecrust/dataproviders/blog.py	Sun Jul 23 08:26:57 2017 -0700
@@ -87,12 +87,10 @@
             taxonomies.append(Taxonomy(tn, tax_cfg))
             tax_index[tn] = {}
 
-        app = self._app
         page = self._page
         source = self._sources[0]
 
-        for item in source.getAllContents():
-            post = app.getPage(source, item)
+        for post in source.getAllPages():
             post_dt = post.datetime
 
             year = post_dt.year