Initial doc site with nanoc.

This commit is contained in:
Chris Eppstein 2010-01-20 22:25:44 -08:00
parent f6f50fc94c
commit 5a893ee8a6
14 changed files with 103 additions and 0 deletions

1
.gitignore vendored
View File

@ -14,3 +14,4 @@ test/fixtures/stylesheets/*/sass/.sass-cache
pkg/*
coverage*
docs
doc-src/tmp

View File

@ -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

1
doc-src/Rakefile Normal file
View File

@ -0,0 +1 @@
require 'nanoc3/tasks'

30
doc-src/Rules Normal file
View File

@ -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

6
doc-src/config.yaml Normal file
View File

@ -0,0 +1,6 @@
---
data_sources:
- items_root: /
layouts_root: /
type: filesystem_compact
output_dir: ../docs

View File

@ -0,0 +1,5 @@
%h1 Compass Documentation
%p
Welcome to the compass docs.

View File

@ -0,0 +1,2 @@
---
title: Home

View File

@ -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)

View File

@ -0,0 +1 @@
--- {}

View File

@ -0,0 +1 @@
%p Hi, I'm a new item!

View File

@ -0,0 +1,2 @@
---
title: A New Item

View File

@ -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

View File

@ -0,0 +1,2 @@
--- {}

4
doc-src/lib/default.rb Normal file
View File

@ -0,0 +1,4 @@
# All files in the 'lib' directory will be loaded
# before nanoc starts compiling.
include Nanoc3::Helpers::LinkTo