example.conf.php 841 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use Sami\Sami;
  3. use Sami\RemoteRepository\GitHubRemoteRepository;
  4. use Sami\Version\GitVersionCollection;
  5. use Symfony\Component\Finder\Finder;
  6. // Import markdown
  7. require "markdown/SamiTwigExtension.php";
  8. $iterator = Finder::create()
  9. ->files()
  10. ->name('*.php')
  11. ->in($dir = './src')
  12. ;
  13. $versions = GitVersionCollection::create($dir)
  14. ->add('master', 'master branch')
  15. ;
  16. $s = new Sami($iterator, array(
  17. 'theme' => 'markdown',
  18. 'template_dirs' => array( __DIR__ . '/markdown'),
  19. 'versions' => $versions,
  20. 'title' => 'Sami Markdown Extension',
  21. 'build_dir' => __DIR__.'/build/%version%',
  22. 'cache_dir' => __DIR__.'/cache/%version%',
  23. ));
  24. // Add extension
  25. $s["twig"]->addExtension(new Markdown\SamiTwigExtension());
  26. return $s;
  27. ?>