예제 #1
0
 /**
  * Render function.
  * @param $files array | A list of all available entries.
  * @return void
  */
 public function execute($files)
 {
     printLn('=> PageWriter.');
     $pages = Application::db()->retrieve('page_list');
     $writer = new DataWriter();
     foreach ($pages as $page) {
         $tmpl = $this->make_data($page);
         $writer->write($tmpl['slug'], 'index.html', $tmpl['html']);
     }
 }
예제 #2
0
 public function execute($files)
 {
     printLn('=> CategoryWriter.');
     $this->make_categories_directory();
     $categories = Application::db()->retrieve('categories_list');
     $writer = new DataWriter();
     foreach ($categories as $cat => $posts) {
         $tmpl = $this->make_data($cat, $posts);
         $writer->write($tmpl['slug'], 'index.html', $tmpl['html']);
     }
 }