Permalink
Browse files

Added Nanoc to the party

  • Loading branch information...
1 parent 88834a3 commit 5ac2812a841e124b711e2673bc2e655172ed05d5 @jbbarth committed Jan 10, 2012
View
@@ -0,0 +1,3 @@
+output
+tmp
+.rvmrc
View
@@ -0,0 +1,6 @@
+source 'http://rubygems.org'
+
+gem 'nanoc', '> 3.1'
+gem 'adsf'
+gem 'redcarpet', '~> 1.17'
+gem 'mime-types'
View
@@ -0,0 +1,22 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ adsf (1.0.1)
+ rack (>= 1.0.0)
+ cri (2.0.2)
+ mime-types (1.17.2)
+ nanoc (3.2.3)
+ nanoc3 (>= 3.2.3)
+ nanoc3 (3.2.3)
+ cri (~> 2.0)
+ rack (1.4.0)
+ redcarpet (1.17.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ adsf
+ mime-types
+ nanoc (> 3.1)
+ redcarpet (~> 1.17)
View
@@ -0,0 +1 @@
+require 'nanoc3/tasks'
View
34 Rules
@@ -0,0 +1,34 @@
+#!/usr/bin/env ruby
+
+# A few helpful tips about the Rules file:
+#
+# * 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 '/assets/*' do
+ # don't filter or layout
+end
+
+compile '*' do
+ filter :redcarpet #:erb
+ layout 'default'
+end
+
+route '/assets/*' do
+ item.identifier.gsub(%r(/$),'.')+item.attributes[:extension]
+end
+
+route '*' do
+ if item.identifier != "/" && item.attributes[:extension] == "html"
+ item.identifier.gsub(%r(/$),'.html')
+ else
+ item.identifier + 'index.html'
+ end
+end
+
+layout '*', :erb
View
@@ -0,0 +1,41 @@
+# 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: [ 'css', 'erb', 'haml', 'htm', 'html', 'js', 'less', 'markdown', 'md', '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.hml", 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
+
+# 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: /
File renamed without changes.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
View
@@ -0,0 +1,82 @@
+/* general styles */
+@font-face {
+ font-family: 'Lobster'; font-style: normal; font-weight: normal;
+ src: local('Lobster'), url('./Lobster.woff') format('woff');
+}
+@font-face {
+ font-family: 'Open Sans'; font-style: normal; font-weight: 700;
+ src: local('Open Sans Bold'), local('OpenSans-Bold'), url('./OpenSans-Bold.woff') format('woff');
+}
+@font-face {
+ font-family: 'Lato'; font-style: normal; font-weight: 400;
+ src: local('Lato Regular'), local('Lato-Regular'), url('./Lato-Regular.woff') format('woff');
+}
+body { background-image: url('./bg-grey-noise.png'); font-family: 'Lato', Helvetica, Verdana, sans-serif; }
+a { text-decoration: none; }
+a:link, a:visited { color: #f30; }
+a:hover { color: #f90; }
+
+/* layout */
+#container {
+ margin: 5px auto 20px;
+ box-shadow: 0 0 15px #222;
+ background-color:#fff;
+ min-height:300px;
+}
+#sidebar, #content {
+ margin:0;
+ padding:12px 10px 12px 0;
+}
+
+/* sidebar */
+#sidebar {
+ margin:0;
+ padding-left:10px;
+ min-height:300px;
+ border-right:1px solid #bbb;
+}
+#sidebar ul, #sidebar li {
+ list-style-type:none;
+ margin:0;
+ font-size:11px;
+}
+#sidebar li.title {
+ font-family: 'Open Sans Bold', sans-serif;
+ text-transform: uppercase;
+ font-weight:bold;
+}
+.sitetitle, .sitesubtitle {
+ display:inline-block;
+ margin:15px 15px 0 15px;
+ text-shadow: 0px 1px 0px #bbb;
+ font-family: 'Lobster', serif;
+ font-size: 36px;
+ font-style: normal;
+ font-weight: 400;
+ color: #312;
+}
+.sitesubtitle {
+ margin:0;
+ font-size:16px;
+ font-family: 'Open Sans', sans-serif;
+}
+h2 {
+ font-family: 'Open Sans', sans-serif;
+ font-size:12px;
+ text-transform:uppercase;
+}
+
+#content pre, #content code {
+ font-family: monospace;
+ background-color: #fafafa;
+ border: 1px solid #dadada;
+ padding: 0 5px;
+}
+
+#content pre {
+ margin: 0.5em 1em 0.5em 1.6em;
+ padding: 5px;
+ width:auto;
+ overflow-x: auto;
+ overflow-y: hidden;
+}
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,13 @@
+---
+title: Home
+---
+
+A Brand New nanoc Site
+======================
+
+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:
+
+* *Change this page's content* 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).
+* *Change the layout*, which is the "default.html" file in the "layouts" directory, and create something unique (and hopefully less bland).
+
+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!
View
@@ -1,56 +0,0 @@
-@font-face {
- font-family: 'Lobster';
- font-style: normal;
- font-weight: normal;
- src: local('Lobster'), url('http://themes.googleusercontent.com/static/fonts/lobster/v5/MWVf-Rwh4GLQVBEwbyI61Q.woff') format('woff');
-}
-@font-face {
- font-family: 'Open Sans';
- font-style: normal;
- font-weight: 700;
- src: local('Open Sans Bold'), local('OpenSans-Bold'), url('http://themes.googleusercontent.com/static/fonts/opensans/v6/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff') format('woff');
-}
-@font-face {
- font-family: 'Lato';
- font-style: normal;
- font-weight: 400;
- src: local('Lato Regular'), local('Lato-Regular'), url('http://themes.googleusercontent.com/static/fonts/lato/v5/9k-RPmcnxYEPm8CNFsH2gg.woff') format('woff');
-}
-body {
- background-image: url('../img/bg-grey-noise.png');
- font-family: 'Lato', Helvetica, Verdana, sans-serif;
-}
-#container {
- margin: 5px auto 20px;
- box-shadow: 0 0 15px #222;
- background-color:#fff;
- min-height:500px;
-}
-#sidebar, #content {
- margin:0;
- padding:12px 10px;
-}
-#sidebar {
- min-height:500px;
- border-right:1px solid #bbb;
-}
-h1, .subtitle {
- display:inline-block;
- margin:15px 15px 0 15px;
- text-shadow: 0px 1px 0px #bbb;
- font-family: 'Lobster', serif;
- font-size: 36px;
- font-style: normal;
- font-weight: 400;
- color: #312;
-}
-.subtitle {
- margin:0;
- font-size:16px;
- font-family: 'Open Sans', sans-serif;
-}
-h2 {
- font-family: 'Open Sans', sans-serif;
- font-size:12px;
- text-transform:uppercase;
-}
View
@@ -1,29 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <link rel="stylesheet" type="text/css" media="all" href="css/reset.css" />
- <link rel="stylesheet" type="text/css" media="all" href="css/text.css" />
- <link rel="stylesheet" type="text/css" media="all" href="css/960.css" />
- <link rel="stylesheet" type="text/css" media="all" href="css/app.css" />
- </head>
- <body>
- <div class="container_16">
- <h1>Cartoque</h1>
- <span class="subtitle">A free & simple CMDB for your datacenter</span>
- </div>
- <div id="container" class="container_16">
- <div class="grid_4">
- <div id="sidebar">
- <ul>
- <h2>Welcome</h2>
- </ul>
- </div>
- </div>
- <div class="grid_12">
- <div id="content">
- <h2>Content</h2>
- </div>
- </div>
- </div>
- </body>
-</html>
View
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Cartoque - <%= @item[:title] %></title>
+ <link rel="stylesheet" type="text/css" media="all" href="./assets/reset.css" />
+ <link rel="stylesheet" type="text/css" media="all" href="./assets/text.css" />
+ <link rel="stylesheet" type="text/css" media="all" href="./assets/960.css" />
+ <link rel="stylesheet" type="text/css" media="all" href="./assets/app.css" />
+ <meta charset="utf-8">
+ <meta name="generator" content="nanoc 3.1.6">
+ </head>
+ <body>
+ <div class="container_16">
+ <span class="sitetitle">Cartoque</span>
+ <span class="sitesubtitle">A free & simple CMDB for your datacenter</span>
+ </div>
+ <div id="container" class="container_16">
+ <div class="grid_4">
+ <%= render "sidebar" %>
+ </div>
+ <div class="grid_12">
+ <div id="content">
+ <%= yield %>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
View
@@ -0,0 +1,5 @@
+<div id="sidebar">
+ <ul>
+ <li class="title">Welcome</li>
+ </ul>
+</div>
View
@@ -0,0 +1,3 @@
+#some useful nanoc helpers
+include Nanoc3::Helpers::Rendering
+include Nanoc3::Helpers::LinkTo

0 comments on commit 5ac2812

Please sign in to comment.