diff --git a/.gitignore b/.gitignore index 6dbe85c3..9d96a9f7 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ test/fixtures/stylesheets/*/sass/.sass-cache pkg/* coverage* docs +doc-src/tmp diff --git a/doc-src/.compass/config.rb b/doc-src/.compass/config.rb new file mode 100644 index 00000000..4082d0ee --- /dev/null +++ b/doc-src/.compass/config.rb @@ -0,0 +1,11 @@ +# Require any additional compass plugins here. +require 'susy' + +# Set this to the root of your project when deployed: +http_path = "/" +css_dir = "../docs/stylesheets" +sass_dir = "content/stylesheets" +images_dir = "content/images" +javascripts_dir = "content/javascripts" +# To enable relative paths to assets via compass helper functions. Uncomment: +# relative_assets = true diff --git a/doc-src/Rakefile b/doc-src/Rakefile new file mode 100644 index 00000000..f484d249 --- /dev/null +++ b/doc-src/Rakefile @@ -0,0 +1 @@ +require 'nanoc3/tasks' \ No newline at end of file diff --git a/doc-src/Rules b/doc-src/Rules new file mode 100644 index 00000000..d2ebbf18 --- /dev/null +++ b/doc-src/Rules @@ -0,0 +1,30 @@ +#!/usr/bin/env ruby + +require 'compass' + +Compass.configuration.parse "#{File.dirname(__FILE__)}/.compass/config.rb" + +compile '/stylesheets/*/' do + filter :sass, Compass.sass_engine_options +end + +compile '*' do + filter :haml + layout 'default' +end + +route '/stylesheets/_*/' do + # don't output partials, so return nil + nil +end + +route '/stylesheets/*/' do + # don't generate a directory like we do for HTML files + item.identifier.chop + '.css' +end + +route '*' do + item.identifier + 'index.html' +end + +layout '*', :haml diff --git a/doc-src/config.yaml b/doc-src/config.yaml new file mode 100644 index 00000000..4bc6e049 --- /dev/null +++ b/doc-src/config.yaml @@ -0,0 +1,6 @@ +--- +data_sources: +- items_root: / + layouts_root: / + type: filesystem_compact +output_dir: ../docs diff --git a/doc-src/content/index.haml b/doc-src/content/index.haml new file mode 100644 index 00000000..5a612a07 --- /dev/null +++ b/doc-src/content/index.haml @@ -0,0 +1,5 @@ +%h1 Compass Documentation + +%p + Welcome to the compass docs. + diff --git a/doc-src/content/index.yaml b/doc-src/content/index.yaml new file mode 100644 index 00000000..cb60025b --- /dev/null +++ b/doc-src/content/index.yaml @@ -0,0 +1,2 @@ +--- +title: Home diff --git a/doc-src/content/stylesheets/main.sass b/doc-src/content/stylesheets/main.sass new file mode 100644 index 00000000..2622404f --- /dev/null +++ b/doc-src/content/stylesheets/main.sass @@ -0,0 +1,16 @@ +@import blueprint + +body + font-family: "Lucida Sans", "Lucida Grande", Lucida, sans-serif + +#container + +container + +#main + +column(24 - 6, true) + +prepend(6) + +#sidebar + +column(6) + +pull(24, true) + \ No newline at end of file diff --git a/doc-src/content/stylesheets/main.yaml b/doc-src/content/stylesheets/main.yaml new file mode 100644 index 00000000..2fbf0ffd --- /dev/null +++ b/doc-src/content/stylesheets/main.yaml @@ -0,0 +1 @@ +--- {} diff --git a/doc-src/content/test.haml b/doc-src/content/test.haml new file mode 100644 index 00000000..e9f760e6 --- /dev/null +++ b/doc-src/content/test.haml @@ -0,0 +1 @@ +%p Hi, I'm a new item! diff --git a/doc-src/content/test.yaml b/doc-src/content/test.yaml new file mode 100644 index 00000000..e5219766 --- /dev/null +++ b/doc-src/content/test.yaml @@ -0,0 +1,2 @@ +--- +title: A New Item diff --git a/doc-src/layouts/default.haml b/doc-src/layouts/default.haml new file mode 100644 index 00000000..ac2c3357 --- /dev/null +++ b/doc-src/layouts/default.haml @@ -0,0 +1,21 @@ +!!! Strict +%html + %head + %title + #{@item[:title]} - Compass + %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "Content-Type" } + %link{ :href => "/stylesheets/main.css", :rel => "stylesheet", :type => "text/css", :media => "screen" } + %body + #container + #main + = yield + #sidebar + %h2 + Compass Documentation + %ul + %li + %a{ :href => "http://nanoc.stoneship.org/tutorial/" } + Reference + %li + %a{ :href => "http://nanoc.stoneship.org/manual/" } + Tutorial \ No newline at end of file diff --git a/doc-src/layouts/default.yaml b/doc-src/layouts/default.yaml new file mode 100644 index 00000000..20670d5f --- /dev/null +++ b/doc-src/layouts/default.yaml @@ -0,0 +1,2 @@ +--- {} + diff --git a/doc-src/lib/default.rb b/doc-src/lib/default.rb new file mode 100644 index 00000000..77f02e4c --- /dev/null +++ b/doc-src/lib/default.rb @@ -0,0 +1,4 @@ +# All files in the 'lib' directory will be loaded +# before nanoc starts compiling. + +include Nanoc3::Helpers::LinkTo \ No newline at end of file