Initial doc site with nanoc.
This commit is contained in:
parent
f6f50fc94c
commit
5a893ee8a6
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,3 +14,4 @@ test/fixtures/stylesheets/*/sass/.sass-cache
|
||||
pkg/*
|
||||
coverage*
|
||||
docs
|
||||
doc-src/tmp
|
||||
|
11
doc-src/.compass/config.rb
Normal file
11
doc-src/.compass/config.rb
Normal 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
1
doc-src/Rakefile
Normal file
@ -0,0 +1 @@
|
||||
require 'nanoc3/tasks'
|
30
doc-src/Rules
Normal file
30
doc-src/Rules
Normal 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
6
doc-src/config.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
data_sources:
|
||||
- items_root: /
|
||||
layouts_root: /
|
||||
type: filesystem_compact
|
||||
output_dir: ../docs
|
5
doc-src/content/index.haml
Normal file
5
doc-src/content/index.haml
Normal file
@ -0,0 +1,5 @@
|
||||
%h1 Compass Documentation
|
||||
|
||||
%p
|
||||
Welcome to the compass docs.
|
||||
|
2
doc-src/content/index.yaml
Normal file
2
doc-src/content/index.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
title: Home
|
16
doc-src/content/stylesheets/main.sass
Normal file
16
doc-src/content/stylesheets/main.sass
Normal 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)
|
||||
|
1
doc-src/content/stylesheets/main.yaml
Normal file
1
doc-src/content/stylesheets/main.yaml
Normal file
@ -0,0 +1 @@
|
||||
--- {}
|
1
doc-src/content/test.haml
Normal file
1
doc-src/content/test.haml
Normal file
@ -0,0 +1 @@
|
||||
%p Hi, I'm a new item!
|
2
doc-src/content/test.yaml
Normal file
2
doc-src/content/test.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
title: A New Item
|
21
doc-src/layouts/default.haml
Normal file
21
doc-src/layouts/default.haml
Normal 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
|
2
doc-src/layouts/default.yaml
Normal file
2
doc-src/layouts/default.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
--- {}
|
||||
|
4
doc-src/lib/default.rb
Normal file
4
doc-src/lib/default.rb
Normal file
@ -0,0 +1,4 @@
|
||||
# All files in the 'lib' directory will be loaded
|
||||
# before nanoc starts compiling.
|
||||
|
||||
include Nanoc3::Helpers::LinkTo
|
Loading…
Reference in New Issue
Block a user