Namespaces: - "spress.config.site_dir": (string) The path to the site. "./" by defatul. - "spress.externals": (array) Externals attributes. e.g: CLI command arguments. These attributes could be recovered on a site using "spress.external.attribute_name". - "spress.dataSourceManager.parameters": (array) Parameters accesibles by arguments at Datasources declaration. - "spress.cms.converterManager.converters" (array) List of predefined converters.
Author: Victor Puertas (vpgugr@gmail.com)
Inheritance: extends Pimple\Container
示例#1
0
 public function testReParseSite()
 {
     $dw = new MemoryDataWriter();
     $spress = new Spress();
     $spress['spress.config.site_dir'] = __DIR__ . '/fixtures/project';
     $spress['spress.dataWriter'] = $dw;
     $spress->parse();
     $this->assertCount(17, $dw->getItems());
     $spress->parse();
     $this->assertCount(17, $dw->getItems());
 }
示例#2
0
 /**
  * Enables Parsedown converter.
  *
  * @param Spress $spress
  */
 protected function enableParsedown(Spress $spress)
 {
     $spress->extend('spress.cms.converterManager.converters', function ($predefinedConverters, $c) {
         unset($predefinedConverters['MichelfMarkdownConverter']);
         $markdownExts = $c['spress.config.values']['markdown_ext'];
         $predefinedConverters['ParsedownConverter'] = new ParsedownConverter($markdownExts);
         return $predefinedConverters;
     });
 }