Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/Rules
diff options
context:
space:
mode:
authorConnor Shea <connor.james.shea@gmail.com>2016-10-06 08:40:24 +0300
committerConnor Shea <connor.james.shea@gmail.com>2016-10-06 08:40:24 +0300
commit764ca757a5584314c2a5515140b523f52c9d6997 (patch)
tree585ba3f994ca8392b5ee4f2097eda06990e0728c /Rules
Init repo.
Diffstat (limited to 'Rules')
-rw-r--r--Rules39
1 files changed, 39 insertions, 0 deletions
diff --git a/Rules b/Rules
new file mode 100644
index 00000000..475bddfc
--- /dev/null
+++ b/Rules
@@ -0,0 +1,39 @@
+#!/usr/bin/env ruby
+
+compile '/**/*.html' do
+ layout '/default.*'
+end
+
+# This is an example rule that matches Markdown (.md) files, and filters them
+# using the :kramdown filter. It is commented out by default, because kramdown
+# is not bundled with Nanoc or Ruby.
+#
+compile '/**/*.md' do
+ filter :kramdown
+ layout '/default.*'
+end
+
+compile '/content/stylesheet.scss' do
+ filter :sass, syntax: :scss
+ write item.identifier.without_ext + '.css'
+end
+
+route '/**/*.scss' do
+ item.identifier.without_ext + '.css'
+end
+
+route '/**/*.{html,md}' do
+ if item.identifier =~ '/index.*'
+ '/index.html'
+ else
+ item.identifier.without_ext + '/index.html'
+ end
+end
+
+compile '/**/*' do
+ unless item.identifier.ext == 'scss'
+ write item.identifier.to_s
+ end
+end
+
+layout '/**/*', :erb