Browse Source

Added files

Joachim M. Giæver 7 years ago
parent
commit
bb088cf065
2 changed files with 39 additions and 0 deletions
  1. 35 0
      example.conf.php
  2. 4 0
      manifest.yml

+ 35 - 0
example.conf.php

@@ -0,0 +1,35 @@
+<?php
+
+use Sami\Sami;
+use Sami\RemoteRepository\GitHubRemoteRepository;
+use Sami\Version\GitVersionCollection;
+use Symfony\Component\Finder\Finder;
+
+// Import markdown
+require "markdown/SamiTwigExtension.php";
+
+$iterator = Finder::create()
+    ->files()
+    ->name('*.php')
+    ->in($dir = './src')
+;
+
+$versions = GitVersionCollection::create($dir)
+    ->add('master', 'master branch')
+    ;
+
+$s =  new Sami($iterator, array(
+    'theme'                => 'markdown',
+    'template_dirs'        => array( __DIR__ . '/markdown'),
+    'versions'             => $versions,
+    'title'                => 'Sami Markdown Extension',
+    'build_dir'            => __DIR__.'/build/%version%',
+    'cache_dir'            => __DIR__.'/cache/%version%',
+));
+
+// Add extension
+$s["twig"]->addExtension(new Markdown\SamiTwigExtension());
+
+return $s;
+
+?>

+ 4 - 0
manifest.yml

@@ -0,0 +1,4 @@
+name: markdown
+
+global:
+    'readme.twig':  'README.md'