sami.conf.php 983 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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 "sami-markdown/SamiTwigExtension.php";
  8. $iterator = Finder::create()
  9. ->files()
  10. /**
  11. * For those who clone this into their project,
  12. * we'll exclude sami-markdown to be rendered.
  13. */
  14. ->exclude("sami-markdown")
  15. ->name('*.php')
  16. ->in($dir = './src')
  17. ;
  18. /*$versions = GitVersionCollection::create($dir)
  19. ->add('master', 'master branch')
  20. ;
  21. */
  22. $s = new Sami($iterator, array(
  23. 'theme' => 'markdown',
  24. 'template_dirs' => array( __DIR__ . '/'),
  25. //'versions' => $versions,
  26. 'title' => 'Yr Forecast',
  27. 'build_dir' => __DIR__.'/build/%version%',
  28. 'cache_dir' => __DIR__.'/cache/%version%',
  29. ));
  30. // Add extension
  31. $s["twig"]->addExtension(new Markdown\SamiTwigExtension());
  32. return $s;
  33. ?>