example.conf.php 919 B

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