diff --git a/doc-src/.compass/config.rb b/doc-src/.compass/config.rb index 8218389a..3ca1b348 100644 --- a/doc-src/.compass/config.rb +++ b/doc-src/.compass/config.rb @@ -6,7 +6,7 @@ http_path = "/" project_path = File.expand_path(File.join(File.dirname(__FILE__), '..')) css_dir = "../docs/stylesheets" sass_dir = "content/stylesheets" -images_dir = "content/images" +images_dir = "assets/images" http_images_dir = "images" javascripts_dir = "content/javascripts" http_javascripts_dir = "javascripts" diff --git a/doc-src/Rules b/doc-src/Rules index d5857e8f..1ae27cab 100644 --- a/doc-src/Rules +++ b/doc-src/Rules @@ -4,11 +4,7 @@ require 'compass' Compass.configuration.parse "#{File.dirname(__FILE__)}/.compass/config.rb" -compile '/css/*/' do - nil -end - -compile '/images/*/' do +compile '/assets/*/' do nil end @@ -20,10 +16,6 @@ compile '/examples/*/stylesheet/' do nil end -compile '/javascripts/*/' do - nil -end - compile '/examples/*/' do filter :haml, :ugly => true layout 'example' @@ -43,16 +35,16 @@ route '/stylesheets/_*/' do nil end -route '/css/*/' do - item.identifier.chop.gsub(%r{/css}, '/stylesheets')+"."+item[:extension] +route '/assets/css/*/' do + "/stylesheets"+item.identifier.chop[11..-1]+"."+item[:extension] end -route '/images/*/' do - item.identifier.chop+"."+item[:extension] +route '/assets/images/*/' do + item.identifier.chop[7..-1]+"."+item[:extension] end -route '/javascripts/*/' do - item.identifier.chop+"."+item[:extension] +route '/assets/javascripts/*/' do + item.identifier.chop[7..-1]+"."+item[:extension] end route '/stylesheets/*/' do diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/doc-src/assets/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png similarity index 100% rename from doc-src/content/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png rename to doc-src/assets/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/doc-src/assets/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png similarity index 100% rename from doc-src/content/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png rename to doc-src/assets/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png b/doc-src/assets/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png similarity index 100% rename from doc-src/content/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png rename to doc-src/assets/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png b/doc-src/assets/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png similarity index 100% rename from doc-src/content/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png rename to doc-src/assets/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png b/doc-src/assets/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png similarity index 100% rename from doc-src/content/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png rename to doc-src/assets/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png b/doc-src/assets/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png similarity index 100% rename from doc-src/content/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png rename to doc-src/assets/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/doc-src/assets/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png similarity index 100% rename from doc-src/content/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png rename to doc-src/assets/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/doc-src/assets/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png similarity index 100% rename from doc-src/content/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png rename to doc-src/assets/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/doc-src/assets/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png similarity index 100% rename from doc-src/content/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png rename to doc-src/assets/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png diff --git a/doc-src/content/css/ui-lightness/images/ui-icons_222222_256x240.png b/doc-src/assets/css/ui-lightness/images/ui-icons_222222_256x240.png similarity index 100% rename from doc-src/content/css/ui-lightness/images/ui-icons_222222_256x240.png rename to doc-src/assets/css/ui-lightness/images/ui-icons_222222_256x240.png diff --git a/doc-src/content/css/ui-lightness/images/ui-icons_228ef1_256x240.png b/doc-src/assets/css/ui-lightness/images/ui-icons_228ef1_256x240.png similarity index 100% rename from doc-src/content/css/ui-lightness/images/ui-icons_228ef1_256x240.png rename to doc-src/assets/css/ui-lightness/images/ui-icons_228ef1_256x240.png diff --git a/doc-src/content/css/ui-lightness/images/ui-icons_ef8c08_256x240.png b/doc-src/assets/css/ui-lightness/images/ui-icons_ef8c08_256x240.png similarity index 100% rename from doc-src/content/css/ui-lightness/images/ui-icons_ef8c08_256x240.png rename to doc-src/assets/css/ui-lightness/images/ui-icons_ef8c08_256x240.png diff --git a/doc-src/content/css/ui-lightness/images/ui-icons_ffd27a_256x240.png b/doc-src/assets/css/ui-lightness/images/ui-icons_ffd27a_256x240.png similarity index 100% rename from doc-src/content/css/ui-lightness/images/ui-icons_ffd27a_256x240.png rename to doc-src/assets/css/ui-lightness/images/ui-icons_ffd27a_256x240.png diff --git a/doc-src/content/css/ui-lightness/images/ui-icons_ffffff_256x240.png b/doc-src/assets/css/ui-lightness/images/ui-icons_ffffff_256x240.png similarity index 100% rename from doc-src/content/css/ui-lightness/images/ui-icons_ffffff_256x240.png rename to doc-src/assets/css/ui-lightness/images/ui-icons_ffffff_256x240.png diff --git a/doc-src/content/css/ui-lightness/jquery-ui-1.7.2.custom.css b/doc-src/assets/css/ui-lightness/jquery-ui-1.7.2.custom.css similarity index 100% rename from doc-src/content/css/ui-lightness/jquery-ui-1.7.2.custom.css rename to doc-src/assets/css/ui-lightness/jquery-ui-1.7.2.custom.css diff --git a/doc-src/content/images/tipsy.gif b/doc-src/assets/images/tipsy.gif similarity index 100% rename from doc-src/content/images/tipsy.gif rename to doc-src/assets/images/tipsy.gif diff --git a/doc-src/content/javascripts/jquery-1.3.2.min.js b/doc-src/assets/javascripts/jquery-1.3.2.min.js similarity index 100% rename from doc-src/content/javascripts/jquery-1.3.2.min.js rename to doc-src/assets/javascripts/jquery-1.3.2.min.js diff --git a/doc-src/content/javascripts/jquery-ui-1.7.2.custom.min.js b/doc-src/assets/javascripts/jquery-ui-1.7.2.custom.min.js similarity index 100% rename from doc-src/content/javascripts/jquery-ui-1.7.2.custom.min.js rename to doc-src/assets/javascripts/jquery-ui-1.7.2.custom.min.js diff --git a/doc-src/content/javascripts/jquery.tipsy.js b/doc-src/assets/javascripts/jquery.tipsy.js similarity index 100% rename from doc-src/content/javascripts/jquery.tipsy.js rename to doc-src/assets/javascripts/jquery.tipsy.js diff --git a/doc-src/config.yaml b/doc-src/config.yaml index 4bc6e049..9195123a 100644 --- a/doc-src/config.yaml +++ b/doc-src/config.yaml @@ -3,4 +3,7 @@ data_sources: - items_root: / layouts_root: / type: filesystem_compact +- items_root: /assets + layouts_root: /assets + type: filesystem_assets output_dir: ../docs diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.yaml b/doc-src/content/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.yaml deleted file mode 100644 index 1ca05ee2..00000000 --- a/doc-src/content/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: png \ No newline at end of file diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.yaml b/doc-src/content/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.yaml deleted file mode 100644 index 1ca05ee2..00000000 --- a/doc-src/content/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: png \ No newline at end of file diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.yaml b/doc-src/content/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.yaml deleted file mode 100644 index 1ca05ee2..00000000 --- a/doc-src/content/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: png \ No newline at end of file diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.yaml b/doc-src/content/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.yaml deleted file mode 100644 index 1ca05ee2..00000000 --- a/doc-src/content/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: png \ No newline at end of file diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.yaml b/doc-src/content/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.yaml deleted file mode 100644 index 1ca05ee2..00000000 --- a/doc-src/content/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: png \ No newline at end of file diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.yaml b/doc-src/content/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.yaml deleted file mode 100644 index 1ca05ee2..00000000 --- a/doc-src/content/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: png \ No newline at end of file diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.yaml b/doc-src/content/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.yaml deleted file mode 100644 index 1ca05ee2..00000000 --- a/doc-src/content/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: png \ No newline at end of file diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.yaml b/doc-src/content/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.yaml deleted file mode 100644 index 1ca05ee2..00000000 --- a/doc-src/content/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: png \ No newline at end of file diff --git a/doc-src/content/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.yaml b/doc-src/content/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.yaml deleted file mode 100644 index 1ca05ee2..00000000 --- a/doc-src/content/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: png \ No newline at end of file diff --git a/doc-src/content/css/ui-lightness/images/ui-icons_222222_256x240.yaml b/doc-src/content/css/ui-lightness/images/ui-icons_222222_256x240.yaml deleted file mode 100644 index 1ca05ee2..00000000 --- a/doc-src/content/css/ui-lightness/images/ui-icons_222222_256x240.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: png \ No newline at end of file diff --git a/doc-src/content/css/ui-lightness/images/ui-icons_228ef1_256x240.yaml b/doc-src/content/css/ui-lightness/images/ui-icons_228ef1_256x240.yaml deleted file mode 100644 index 1ca05ee2..00000000 --- a/doc-src/content/css/ui-lightness/images/ui-icons_228ef1_256x240.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: png \ No newline at end of file diff --git a/doc-src/content/css/ui-lightness/images/ui-icons_ef8c08_256x240.yaml b/doc-src/content/css/ui-lightness/images/ui-icons_ef8c08_256x240.yaml deleted file mode 100644 index 1ca05ee2..00000000 --- a/doc-src/content/css/ui-lightness/images/ui-icons_ef8c08_256x240.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: png \ No newline at end of file diff --git a/doc-src/content/css/ui-lightness/images/ui-icons_ffd27a_256x240.yaml b/doc-src/content/css/ui-lightness/images/ui-icons_ffd27a_256x240.yaml deleted file mode 100644 index 1ca05ee2..00000000 --- a/doc-src/content/css/ui-lightness/images/ui-icons_ffd27a_256x240.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: png \ No newline at end of file diff --git a/doc-src/content/css/ui-lightness/images/ui-icons_ffffff_256x240.yaml b/doc-src/content/css/ui-lightness/images/ui-icons_ffffff_256x240.yaml deleted file mode 100644 index 1ca05ee2..00000000 --- a/doc-src/content/css/ui-lightness/images/ui-icons_ffffff_256x240.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: png \ No newline at end of file diff --git a/doc-src/content/css/ui-lightness/jquery-ui-1.7.2.custom.yaml b/doc-src/content/css/ui-lightness/jquery-ui-1.7.2.custom.yaml deleted file mode 100644 index 1b4abf26..00000000 --- a/doc-src/content/css/ui-lightness/jquery-ui-1.7.2.custom.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: css \ No newline at end of file diff --git a/doc-src/content/images/tipsy.yaml b/doc-src/content/images/tipsy.yaml deleted file mode 100644 index f945d6f1..00000000 --- a/doc-src/content/images/tipsy.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: gif \ No newline at end of file diff --git a/doc-src/content/javascripts/jquery-1.3.2.min.yaml b/doc-src/content/javascripts/jquery-1.3.2.min.yaml deleted file mode 100644 index 032069f2..00000000 --- a/doc-src/content/javascripts/jquery-1.3.2.min.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: js \ No newline at end of file diff --git a/doc-src/content/javascripts/jquery-ui-1.7.2.custom.min.yaml b/doc-src/content/javascripts/jquery-ui-1.7.2.custom.min.yaml deleted file mode 100644 index 032069f2..00000000 --- a/doc-src/content/javascripts/jquery-ui-1.7.2.custom.min.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: js \ No newline at end of file diff --git a/doc-src/content/javascripts/jquery.tipsy.yaml b/doc-src/content/javascripts/jquery.tipsy.yaml deleted file mode 100644 index 032069f2..00000000 --- a/doc-src/content/javascripts/jquery.tipsy.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -extension: js \ No newline at end of file diff --git a/doc-src/lib/data_sources/asset_data_source.rb b/doc-src/lib/data_sources/asset_data_source.rb new file mode 100644 index 00000000..fc737ad8 --- /dev/null +++ b/doc-src/lib/data_sources/asset_data_source.rb @@ -0,0 +1,15 @@ +class AssetDataSource < Nanoc3::DataSource + identifier :filesystem_assets + + def items + files = [] + Dir.glob("assets/**/*").each do |f| + files << f if File.file?(f) + end + files.map do |f| + identifier = f[7..-1].gsub(/\.[^.]+$/,'')+"/" + attrs = {:extension => File.extname(f)[1..-1]} + Nanoc3::Item.new(File.read(f), attrs, identifier, File.mtime(f)) + end + end +end