Permalink
Browse files

initial nanoc page

  • Loading branch information...
akwiatkowski committed Apr 23, 2012
1 parent ffeaf28 commit 3e6c0d3bc589c05acb86ba775c9b079332fb1a3f
View
@@ -0,0 +1,2 @@
+.idea
+source/tmp
View
@@ -1,2 +0,0 @@
-akwiatkowski.github.com
-=======================
View
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+ <head>
+ <meta />
+ <title>
+ akwiatkowski.github.com
+ - Home
+ </title>
+ <meta charset='utf-8' />
+ <link href='/style.css' media='screen' rel='stylesheet' type='text/css' />
+ <meta content='nanoc 3.3.3' name='generator' />
+ </head>
+ <body>
+ <h2>
+ <a href='http://akwiatkowski.github.com'>
+ akwiatkowski.github.com
+ </a>
+ </h2>
+ <hr />
+ <div id='main'>
+ <p>
+ Hello. It is my first page created using nanoc + haml.
+ </p>
+ <p>
+ Other stuff coming soon.
+ </p>
+ </div>
+ <hr>
+ <a href='http://github.com/akwiatkowski'>
+ github
+ </a>
+ </hr>
+ </body>
+</html>
View
@@ -0,0 +1 @@
+rvm use 1.9.2@akwiatkowski_github_com --create
View
@@ -0,0 +1,4 @@
+source 'http://rubygems.org'
+
+gem 'nanoc'
+gem 'haml'
View
@@ -0,0 +1,14 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ cri (2.2.1)
+ haml (3.1.4)
+ nanoc (3.3.3)
+ cri (~> 2.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ haml
+ nanoc
View
@@ -0,0 +1,46 @@
+#!/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
+ elsif item.attributes[:extension] =~ /haml/
+ filter :haml
+ layout 'default'
+ 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 '*', :haml
View
@@ -0,0 +1,77 @@
+# 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', 'coffee' ]
+
+# 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: '..'
+
+# 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
+
+# Configuration for the “watch” command, which watches a site for changes and
+# recompiles if necessary.
+watcher:
+ # A list of directories to watch for changes. When editing this, make sure
+ # that the “output/” and “tmp/” directories are _not_ included in this list,
+ # because recompiling the site will cause these directories to change, which
+ # will cause the site to be recompiled, which will cause these directories
+ # to change, which will cause the site to be recompiled again, and so on.
+ dirs_to_watch: [ 'content', 'layouts', 'lib' ]
+
+ # A list of single files to watch for changes. As mentioned above, don’t put
+ # any files from the “output/” or “tmp/” directories in here.
+ files_to_watch: [ 'config.yaml', 'Rules' ]
+
+ # When to send notifications (using Growl or notify-send).
+ notify_on_compilation_success: true
+ notify_on_compilation_failure: true
@@ -0,0 +1,5 @@
+%p
+ Hello. It is my first page created using nanoc + haml.
+
+%p
+ Other stuff coming soon.
@@ -0,0 +1 @@
+title: "Home"
@@ -0,0 +1,101 @@
+* {
+ margin: 0;
+ padding: 0;
+
+ font-family: Georgia, Palatino, Times, 'Times New Roman', sans-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;
+}
@@ -0,0 +1,23 @@
+!!!
+%html
+ %head
+ %meta{}
+ %title
+ = "akwiatkowski.github.com"
+ = " - #{@item[:title]}" unless @item[:title].nil?
+ %meta{:charset => "utf-8"}
+ %link{:href => "/style.css", :media => "screen", :rel => "stylesheet", :type => "text/css"}
+ %meta{:content => "nanoc 3.3.3", :name => "generator"}/
+
+ %body
+ %h2
+ %a{href: 'http://akwiatkowski.github.com'}
+ = "akwiatkowski.github.com"
+ %hr
+
+ #main
+ = yield
+
+ %hr
+ %a{href: 'http://github.com/akwiatkowski'}
+ = "github"
View
@@ -0,0 +1,2 @@
+# All files in the 'lib' directory will be loaded
+# before nanoc starts compiling.
Oops, something went wrong.

0 comments on commit 3e6c0d3

Please sign in to comment.