Skip to content

Instantly share code, notes, and snippets.

@lancejpollard
Created August 31, 2010 02:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lancejpollard/558432 to your computer and use it in GitHub Desktop.
Save lancejpollard/558432 to your computer and use it in GitHub Desktop.
site do
# menu
menu "main" do
link "/", "Home"
link "/blog", "Blog"
# link "/portfolio", "Portfolio"
link "http://lancepollard.info/", "Resume"
end
# javascripts
javascripts do
end
# stylesheets
stylesheets do
end
# feed
feed do
posts do
title "Viatropos' Feed"
author "Lance Pollard"
url c("metadata.domain")
description <<-EOF
<p class="vcard">Thoughts and musings of <a href="http://viatropos.com/" class="url fn">Lance Pollard</a>, a <span class="title">programmer</span> living in <span class="adr"><span class="locality">Berkeley</span>, <abbr class="region"title="California">CA</abbr></span>.</p>
EOF
alternate_url "#{c("metadata.domain")}/blog/"
category_url "#{c("metadata.domain")}/tags/"
icon c("icons.favicon")
logo c("icons.site_icon")
site.posts.each do |post|
next unless post.date
entry "#{c("metadata.domain")}#{post.path}",
:title => post.title,
:description => post.read_description(200),
:created_at => post.date,
:updated_at => post.date,
:author => "Lance Pollard",
:categories => post.tags,
:content => post.render
end
end
end
# sitemap
sitemap do
stylesheet "/stylesheets/sitemap.xsl"
site.posts.each do |post|
link "#{c("metadata.domain")}#{post.path}", :changes => "weekly"
end
end
# templates
templates do
contact
error
overview
pages
large_portfolio "portfolio/large"
medium_portfolio "portfolio/medium"
small_portfolio "portfolio/small"
posts
end
# layouts
layouts do
full do
description "A full width layout, mainly for text"
areas :top, :bottom, :left, :right, :header, :footer, :body
template :pages
end
left do
description "Side bar on the right, content on the left"
template :pages
areas :top, :bottom, :right, :header, :footer, :body
end
right do
description "Side bar on the left, content on the right"
template :pages
areas :top, :bottom, :left, :header, :footer, :body
end
blog do
description "Blog Layout"
template :posts
areas :right, :top, :bottom, :header, :footer, :body
end
page do
description "Page Layout"
template :pages
areas :right, :top, :bottom, :header, :footer, :body
end
contact do
description "Contact Layout"
template :contact
areas :top, :bottom, :header, :footer, :body
end
overview do
description "Overview Layout"
template :overview
areas :top, :bottom, :header, :footer, :body
end
large_portfolio do
description "Large Portfolio Layout"
template :large_portfolio
areas :top, :bottom, :header, :footer, :body
end
medium_portfolio do
description "Medium Portfolio Layout"
template :medium_portfolio
areas :top, :bottom, :header, :footer, :body
end
small_portfolio do
description "Small Portfolio Layout"
template :small_portfolio
areas :top, :bottom, :header, :footer, :body
end
end
# widgets
widgets do
connect do
title :string
facebook :string
twitter :string
my_space :string
linked_in :string
stack_overflow :string
github :string
email :string
end
image do
title :string
url :string
alt_text :string
image_title :string
description :string
image_align :string
link_url :string
end
links do
title "Blog Roll"
end
login do
title "Login"
google true
facebook true
twitter true
open_id true
end
meta do
title "Meta"
end
search do
title "Search"
end
social do
title "Social"
end
tag_cloud do
title "Tag Cloud"
end
text do
title "Random Text"
body :string
end
map do
title "Map"
coordinates ""
end
end
# settings
settings do
asset do
thumb do
width 100, :tip => "Thumb's width"
height 100, :tip => "Thumb's height"
end
medium do
width 600, :tip => "Thumb's width"
height 250, :tip => "Thumb's height"
end
large do
width 600, :tip => "Large's width"
height 295, :tip => "Large's height"
end
end
seo do
pretty_markup true
end
authentication do
use_open_id true
use_oauth true
email "martini@example.com"
password "martini"
end
front_page do
slideshow_tag "slideshow"
slideshow_effect "fade"
end
page do
per_page 10
feed_per_page 10
formats "markdown", :options => ["textile", "markdown", "plain", "html", "haml"]
end
people do
show_avatars true
default_avatar "/images/missing-person.png"
end
site do
title "Martini", :tooltip => "Main Site Title!"
tagline "Developer Friendly, Client Ready Blog with Rails 3"
keywords "Rails 3, Heroku, JQuery, HTML 5, Blog Engine, CSS3"
copyright "© 2010 Viatropos. All rights reserved."
domain "haveamartini.com"
menu :type => :integer,
:value => lambda { Post.roots },
:options => lambda { Post.roots.map {|p| [p.title, p.id]} }
date_format "%m %d, %Y"
time_format "%H"
week_starts_on "Monday", :options => ["Monday", "Sunday", "Friday"]
language "en-US", :options => ["en-US", "de"]
touch_enabled true
touch_as_subdomain false
google_analytics "UA-15601175-11"
mixpanel "c0e8c5b0cba24fce24b915292ea74753"
logo "/images/logo-thumb.png"
cache_duration 60
permalink do
default "/:title"
date "/:date/:title"
numeric "/:id"
custom ""
end
teasers do
disable false
left :type => :integer,
:value => lambda { Post.first },
:options => lambda { Post.tree {|p| [p.title, p.id]} }
right :type => :integer,
:value => lambda { Post.first },
:options => lambda { Post.tree {|p| [p.title, p.id]} }
center :type => :integer,
:value => lambda { Post.first },
:options => lambda { Post.tree {|p| [p.title, p.id]} }
end
main_quote :type => :integer,
:value => lambda { Post.first },
:options => lambda { Post.tree {|p| [p.title, p.id]} }
end
social do
facebook "http://facebook.com/viatropos"
twitter "http://twitter.com/viatropos"
email "lancejpollard@gmail.com"
end
s3 do
key "my_key"
secret "my_secret"
bucket "ilove4d-test"
permalink ":attachment/:id/:style.:extension"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment