Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
9 changed files
with
332 additions
and
0 deletions.
There are no files selected for viewing
11
.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
*~ | ||
\#*\# | ||
.\#* | ||
|
||
output | ||
tmp | ||
.bundle | ||
|
||
.sass-cache | ||
vendor/local | ||
crash.log |
15
Gemfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# A sample Gemfile | ||
source "https://rubygems.org" | ||
|
||
# basic requirement | ||
gem 'adsf' | ||
gem 'guard-nanoc' | ||
|
||
# pandoc | ||
gem 'pandoc-ruby' | ||
|
||
# for command line commands | ||
gem "systemu" | ||
|
||
# debugging | ||
gem 'pry' |
58
Gemfile.lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
adsf (1.2.0) | ||
rack (>= 1.0.0) | ||
celluloid (0.15.2) | ||
timers (~> 1.1.0) | ||
celluloid-io (0.15.0) | ||
celluloid (>= 0.15.0) | ||
nio4r (>= 0.5.0) | ||
coderay (1.1.0) | ||
colored (1.2) | ||
cri (2.5.0) | ||
colored (~> 1.2) | ||
ffi (1.9.3) | ||
formatador (0.2.4) | ||
guard (2.6.0) | ||
formatador (>= 0.2.4) | ||
listen (~> 2.7) | ||
lumberjack (~> 1.0) | ||
pry (>= 0.9.12) | ||
thor (>= 0.18.1) | ||
guard-nanoc (1.0.2) | ||
guard (>= 1.8.0) | ||
nanoc (>= 3.6.3) | ||
listen (2.7.1) | ||
celluloid (>= 0.15.2) | ||
celluloid-io (>= 0.15.0) | ||
rb-fsevent (>= 0.9.3) | ||
rb-inotify (>= 0.9) | ||
lumberjack (1.0.5) | ||
method_source (0.8.2) | ||
nanoc (3.6.8) | ||
cri (~> 2.3) | ||
nio4r (1.0.0) | ||
pandoc-ruby (0.7.5) | ||
pry (0.9.12.6) | ||
coderay (~> 1.0) | ||
method_source (~> 0.8) | ||
slop (~> 3.4) | ||
rack (1.5.2) | ||
rb-fsevent (0.9.4) | ||
rb-inotify (0.9.3) | ||
ffi (>= 0.5.0) | ||
slop (3.5.0) | ||
systemu (2.6.4) | ||
thor (0.19.1) | ||
timers (1.1.0) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
adsf | ||
guard-nanoc | ||
pandoc-ruby | ||
pry | ||
systemu |
43
Rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env ruby | ||
|
||
# A few helpful tips about the Rules file: | ||
# | ||
# * The string given to #compile and #route are matching patterns for | ||
# identifiers--not for paths. Therefore, you can’t match on extension. | ||
# | ||
# * The order of rules is important: for each item, only the first matching | ||
# rule is applied. | ||
# | ||
# * Item identifiers start and end with a slash (e.g. “/about/” for the file | ||
# “content/about.html”). To select all children, grandchildren, … of an | ||
# item, use the pattern “/about/*/”; “/about/*” will also select the parent, | ||
# because “*” matches zero or more characters. | ||
|
||
compile '/stylesheet/' do | ||
# don’t filter or layout | ||
end | ||
|
||
compile '*' do | ||
if item.binary? | ||
# don’t filter binary items | ||
else | ||
filter :erb | ||
layout 'default' | ||
end | ||
end | ||
|
||
route '/stylesheet/' do | ||
'/style.css' | ||
end | ||
|
||
route '*' do | ||
if item.binary? | ||
# Write item with identifier /foo/ to /foo.ext | ||
item.identifier.chop + '.' + item[:extension] | ||
else | ||
# Write item with identifier /foo/ to /foo/index.html | ||
item.identifier + 'index.html' | ||
end | ||
end | ||
|
||
layout '*', :erb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: Home | ||
--- | ||
|
||
<h1>A Brand New nanoc Site</h1> | ||
|
||
<p>You’ve just created a new nanoc site. The page you are looking at right now is the home page for your site. To get started, consider replacing this default homepage with your own customized homepage. Some pointers on how to do so:</p> | ||
|
||
<ul> | ||
<li><p><strong>Change this page’s content</strong> by editing the “index.html” file in the “content” directory. This is the actual page content, and therefore doesn’t include the header, sidebar or style information (those are part of the layout).</p></li> | ||
<li><p><strong>Change the layout</strong>, which is the “default.html” file in the “layouts” directory, and create something unique (and hopefully less bland).</p></li> | ||
</ul> | ||
|
||
<p>If you need any help with customizing your nanoc web site, be sure to check out the documentation (see sidebar), and be sure to subscribe to the discussion group (also see sidebar). Enjoy!</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
|
||
font-family: Georgia, Palatino, serif; | ||
} | ||
|
||
body { | ||
background: #fff; | ||
} | ||
|
||
a { | ||
text-decoration: none; | ||
} | ||
|
||
a:link, | ||
a:visited { | ||
color: #f30; | ||
} | ||
|
||
a:hover { | ||
color: #f90; | ||
} | ||
|
||
#main { | ||
position: absolute; | ||
|
||
top: 40px; | ||
left: 280px; | ||
|
||
width: 500px; | ||
} | ||
|
||
#main h1 { | ||
font-size: 40px; | ||
font-weight: normal; | ||
|
||
line-height: 40px; | ||
|
||
letter-spacing: -1px; | ||
} | ||
|
||
#main p { | ||
margin: 20px 0; | ||
|
||
font-size: 15px; | ||
|
||
line-height: 20px; | ||
} | ||
|
||
#main ul, #main ol { | ||
margin: 20px; | ||
} | ||
|
||
#main li { | ||
font-size: 15px; | ||
|
||
line-height: 20px; | ||
} | ||
|
||
#main ul li { | ||
list-style-type: square; | ||
} | ||
|
||
#sidebar { | ||
position: absolute; | ||
|
||
top: 40px; | ||
left: 20px; | ||
width: 200px; | ||
|
||
padding: 20px 20px 0 0; | ||
|
||
border-right: 1px solid #ccc; | ||
|
||
text-align: right; | ||
} | ||
|
||
#sidebar h2 { | ||
text-transform: uppercase; | ||
|
||
font-size: 13px; | ||
|
||
color: #333; | ||
|
||
letter-spacing: 1px; | ||
|
||
line-height: 20px; | ||
} | ||
|
||
#sidebar ul { | ||
list-style-type: none; | ||
|
||
margin: 20px 0; | ||
} | ||
|
||
#sidebar li { | ||
font-size: 14px; | ||
|
||
line-height: 20px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE HTML> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>A Brand New nanoc Site - <%= @item[:title] %></title> | ||
<link rel="stylesheet" href="/style.css"> | ||
|
||
<!-- you don't need to keep this, but it's cool for stats! --> | ||
<meta name="generator" content="nanoc <%= Nanoc::VERSION %>"> | ||
</head> | ||
<body> | ||
<div id="main"> | ||
<%= yield %> | ||
</div> | ||
<div id="sidebar"> | ||
<h2>Documentation</h2> | ||
<ul> | ||
<li><a href="http://nanoc.ws/docs/">Documentation</a></li> | ||
<li><a href="http://nanoc.ws/docs/tutorial/">Getting Started</a></li> | ||
</ul> | ||
<h2>Community</h2> | ||
<ul> | ||
<li><a href="http://groups.google.com/group/nanoc/">Discussion Group</a></li> | ||
<li><a href="irc://chat.freenode.net/#nanoc">IRC Channel</a></li> | ||
<li><a href="http://github.com/nanoc/nanoc/wiki/">Wiki</a></li> | ||
</ul> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# All files in the 'lib' directory will be loaded | ||
# before nanoc starts compiling. |
59
nanoc.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# A list of file extensions that nanoc will consider to be textual rather than | ||
# binary. If an item with an extension not in this list is found, the file | ||
# will be considered as binary. | ||
text_extensions: [ 'coffee', 'css', 'erb', 'haml', 'handlebars', 'hb', 'htm', 'html', 'js', 'less', 'markdown', 'md', 'ms', 'mustache', 'php', 'rb', 'sass', 'scss', 'txt', 'xhtml', 'xml' ] | ||
|
||
# The path to the directory where all generated files will be written to. This | ||
# can be an absolute path starting with a slash, but it can also be path | ||
# relative to the site directory. | ||
output_dir: output | ||
|
||
# A list of index filenames, i.e. names of files that will be served by a web | ||
# server when a directory is requested. Usually, index files are named | ||
# “index.html”, but depending on the web server, this may be something else, | ||
# such as “default.htm”. This list is used by nanoc to generate pretty URLs. | ||
index_filenames: [ 'index.html' ] | ||
|
||
# Whether or not to generate a diff of the compiled content when compiling a | ||
# site. The diff will contain the differences between the compiled content | ||
# before and after the last site compilation. | ||
enable_output_diff: false | ||
|
||
prune: | ||
# Whether to automatically remove files not managed by nanoc from the output | ||
# directory. For safety reasons, this is turned off by default. | ||
auto_prune: false | ||
|
||
# Which files and directories you want to exclude from pruning. If you version | ||
# your output directory, you should probably exclude VCS directories such as | ||
# .git, .svn etc. | ||
exclude: [ '.git', '.hg', '.svn', 'CVS' ] | ||
|
||
# The data sources where nanoc loads its data from. This is an array of | ||
# hashes; each array element represents a single data source. By default, | ||
# there is only a single data source that reads data from the “content/” and | ||
# “layout/” directories in the site directory. | ||
data_sources: | ||
- | ||
# The type is the identifier of the data source. By default, this will be | ||
# `filesystem_unified`. | ||
type: filesystem_unified | ||
|
||
# The path where items should be mounted (comparable to mount points in | ||
# Unix-like systems). This is “/” by default, meaning that items will have | ||
# “/” prefixed to their identifiers. If the items root were “/en/” | ||
# instead, an item at content/about.html would have an identifier of | ||
# “/en/about/” instead of just “/about/”. | ||
items_root: / | ||
|
||
# The path where layouts should be mounted. The layouts root behaves the | ||
# same as the items root, but applies to layouts rather than items. | ||
layouts_root: / | ||
|
||
# Whether to allow periods in identifiers. When turned off, everything | ||
# past the first period is considered to be the extension, and when | ||
# turned on, only the characters past the last period are considered to | ||
# be the extension. For example, a file named “content/about.html.erb” | ||
# will have the identifier “/about/” when turned off, but when turned on | ||
# it will become “/about.html/” instead. | ||
allow_periods_in_identifiers: false |