From fb998794ae4b99ce7567a8d1588409945a6ac74f Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Thu, 28 Jan 2010 01:11:42 -0800 Subject: [PATCH] put the docs in the docs folder. --- doc-src/Rules | 12 +++++++----- doc-src/config.yaml | 2 +- doc-src/layouts/default.haml | 10 +++++----- doc-src/layouts/example.haml | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/doc-src/Rules b/doc-src/Rules index 1ae27cab..0161186f 100644 --- a/doc-src/Rules +++ b/doc-src/Rules @@ -4,6 +4,8 @@ require 'compass' Compass.configuration.parse "#{File.dirname(__FILE__)}/.compass/config.rb" +SITE_ROOT = "/docs" + compile '/assets/*/' do nil end @@ -36,20 +38,20 @@ route '/stylesheets/_*/' do end route '/assets/css/*/' do - "/stylesheets"+item.identifier.chop[11..-1]+"."+item[:extension] + "#{SITE_ROOT}/stylesheets"+item.identifier.chop[11..-1]+"."+item[:extension] end route '/assets/images/*/' do - item.identifier.chop[7..-1]+"."+item[:extension] + SITE_ROOT+item.identifier.chop[7..-1]+"."+item[:extension] end route '/assets/javascripts/*/' do - item.identifier.chop[7..-1]+"."+item[:extension] + SITE_ROOT+item.identifier.chop[7..-1]+"."+item[:extension] end route '/stylesheets/*/' do # don't generate a directory like we do for HTML files - item.identifier.chop + '.css' + SITE_ROOT+item.identifier.chop + '.css' end route '/examples/*/markup/' do @@ -61,7 +63,7 @@ route '/examples/*/stylesheet/' do end route '*' do - item.identifier + 'index.html' + SITE_ROOT+item.identifier + 'index.html' end layout '*', :haml, :ugly => true diff --git a/doc-src/config.yaml b/doc-src/config.yaml index 199a304c..02dacb5e 100644 --- a/doc-src/config.yaml +++ b/doc-src/config.yaml @@ -6,4 +6,4 @@ data_sources: - items_root: /assets layouts_root: /assets type: filesystem_assets -output_dir: ../docs +output_dir: .. diff --git a/doc-src/layouts/default.haml b/doc-src/layouts/default.haml index d5f49c09..acfc32a1 100644 --- a/doc-src/layouts/default.haml +++ b/doc-src/layouts/default.haml @@ -4,11 +4,11 @@ %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" } - %link{ :href => "/stylesheets/ui-lightness/jquery-ui-1.7.2.custom.css", :rel => "stylesheet", :type => "text/css", :media => "screen" } - %script{:src => "/javascripts/jquery-1.3.2.min.js", :type => "text/javascript"} - %script{:src => "/javascripts/jquery-ui-1.7.2.custom.min.js", :type => "text/javascript"} - %script{:src => "/javascripts/jquery.tipsy.js", :type => "text/javascript"} + %link{ :href => "/docs/stylesheets/main.css", :rel => "stylesheet", :type => "text/css", :media => "screen" } + %link{ :href => "/docs/stylesheets/ui-lightness/jquery-ui-1.7.2.custom.css", :rel => "stylesheet", :type => "text/css", :media => "screen" } + %script{:src => "/docs/javascripts/jquery-1.3.2.min.js", :type => "text/javascript"} + %script{:src => "/docs/javascripts/jquery-ui-1.7.2.custom.min.js", :type => "text/javascript"} + %script{:src => "/docs/javascripts/jquery.tipsy.js", :type => "text/javascript"} %body{body_attributes(@item)} #container #main diff --git a/doc-src/layouts/example.haml b/doc-src/layouts/example.haml index ce73fcfe..c3471648 100644 --- a/doc-src/layouts/example.haml +++ b/doc-src/layouts/example.haml @@ -4,7 +4,7 @@ %title #{@item[:title]} - Compass %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "Content-Type" } - %link{ :href => "/stylesheets/example.css", :rel => "stylesheet", :type => "text/css", :media => "screen" } + %link{ :href => "/docs/stylesheets/example.css", :rel => "stylesheet", :type => "text/css", :media => "screen" } %style{:type => "text/css"}= example_css %body{body_attributes(@item)} #container