-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fec5920
Showing
27 changed files
with
5,299 additions
and
0 deletions.
There are no files selected for viewing
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 @@ | ||
.sass-cache/ | ||
.DS_Store |
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,61 @@ | ||
h1. Hyde | ||
|
||
h2. What is Hyde? | ||
|
||
Hyde is a mashup of several static website development frameworks and utilities. These include Jekyll, Haml, and Sass. All of these tools can be researched and installed separately, but Hyde will install and get you going very quick. Jekyll doesn't support Haml or Sass by default, which is the main drive behind Hyde. Hyde will not only install Jekyll, Haml and Sass, but also provide you with a simple site directory with watchers and conversions. | ||
|
||
h2. What is included? | ||
|
||
h3. Jekyll | ||
|
||
h3. Haml | ||
|
||
h3. Sass | ||
|
||
h3. Guard | ||
|
||
h3. Guard-Rake | ||
|
||
h3. rb_event - a Growl plugin | ||
|
||
h3. Growl Notify | ||
|
||
h2. How to use Hyde. | ||
|
||
# clone Hyde | ||
# cd into the Hyde root directory (contains _site, RakeFile and README) | ||
# run @rake hyde@ _will install all the goodies needed_ | ||
# cd into "_site" | ||
# run @jekyll --server@ _will generate the public site and start a preview_ | ||
# browse to "http://localhost:4000":http://localhost:4000 and make sure things are groovy. | ||
# CTRL+C to stop the Jekyll preview | ||
# run @guard start@ _will tell guard to begin watching the Haml and Sass source directories_ | ||
# make an edit to a Haml or Sass source file and see Guard to its thing. | ||
# CTRL+C to stop guard and run @jekyll --server@ and see the updated site. | ||
|
||
Your public site will be in @_site/_public@ to grab and place on your server. | ||
|
||
h3. Other workflows | ||
|
||
# cd into "_site" | ||
# run @rake parse_templates@ _will manually run the Haml and Sass compilers_ | ||
# run @jekyll --server@ _will generate the public site and start a preview_ | ||
|
||
|
||
h2. Props | ||
|
||
"Tom Preston-Werner : Jekyll":http://jekyllrb.com/ | ||
"Mike Ferrier":http://mikeferrier.com/2011/04/29/blogging-with-jekyll-haml-sass-and-jammit/ | ||
"Twitter : Bootstrap":http://twitter.github.com/bootstrap/ | ||
"Haml":http://haml-lang.com/ | ||
"Sass":http://sass-lang.com/ | ||
"Guard":https://github.com/guard/guard | ||
"Guard-Rake":https://github.com/rubyist/guard-rake | ||
|
||
h2. License | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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,178 @@ | ||
desc "Hyde - One stop for a static blog." | ||
|
||
task :hyde => [:systems_check] do | ||
|
||
end | ||
|
||
#Asks the user for a basic systems check of Ruby and Ruby Gems | ||
task :systems_check do | ||
STDOUT.puts "## Can we check your system for Ruby and Ruby Gems? (y/n)" | ||
|
||
input = STDIN.gets.strip | ||
|
||
if input == 'y' | ||
Rake::Task["ruby:check_ruby"].invoke | ||
else | ||
Rake::Task["hyde_aborted"].invoke | ||
end | ||
end | ||
|
||
|
||
namespace :ruby do | ||
|
||
#Start by checking if the system has Ruby and Ruby Gem installed | ||
task :check_ruby do | ||
puts "## let's start this off by checking for Ruby" | ||
|
||
if system "ruby --version" | ||
puts "## Ruby is installed." | ||
Rake::Task["ruby:check_gem"].invoke | ||
else | ||
puts "## Let's check for Ruby Gem." | ||
Rake::Task["ruby:ruby_not_detected"].invoke | ||
end | ||
end | ||
|
||
#Stops Hyde set up because Ruby is not detected | ||
task :ruby_not_detected do | ||
puts "## Please install Ruby and run this install again." | ||
puts "## More information can be found at http://www.ruby-lang.org/en/" | ||
puts "## You should also install ruby gems." | ||
puts "## More information can be found at http://rubygems.org/pages/download" | ||
end | ||
|
||
task :check_gem do | ||
if system "gem --version" | ||
puts "## Ruby Gems is installed." | ||
Rake::Task["jekyll:install_jekyll"].invoke | ||
else | ||
puts "Ruby Gems is not installed." | ||
Rake::Task["ruby:rubygems_not_detected"].invoke | ||
end | ||
end | ||
|
||
#Stops Hyde set up because Ruby Gems is not detected | ||
task :rubygems_not_detected do | ||
puts "## Please install Ruby Gems and run this install again." | ||
puts "## More information can be found at http://rubygems.org/pages/download" | ||
end | ||
end | ||
|
||
|
||
namespace :jekyll do | ||
|
||
task :install_jekyll => :gem_jekyll do | ||
puts "## Jekyll installed." | ||
Rake::Task["haml:install_haml"].invoke | ||
end | ||
|
||
task :gem_jekyll do | ||
puts "## Installing Jekyll." | ||
system "gem install jekyll" | ||
end | ||
|
||
task :abort do | ||
end | ||
end | ||
|
||
|
||
namespace :haml do | ||
|
||
task :install_haml => :gem_haml do | ||
puts "## Haml installed." | ||
Rake::Task["sass:install_sass"].invoke | ||
end | ||
|
||
task :gem_haml do | ||
puts "## Installing Haml." | ||
system "gem install haml" | ||
end | ||
|
||
task :abort do | ||
end | ||
end | ||
|
||
|
||
namespace :sass do | ||
|
||
task :install_sass => :gem_sass do | ||
puts "## Sass installed." | ||
Rake::Task["guard:install_guard"].invoke | ||
end | ||
|
||
task :gem_sass do | ||
puts "## Installing Sass." | ||
system "gem install sass" | ||
end | ||
|
||
task :abort do | ||
end | ||
end | ||
|
||
|
||
namespace :guard do | ||
task :install_guard => :gem_guard do | ||
puts "## Guard installed." | ||
Rake::Task["guard_rake:install_guard_rake"].invoke | ||
end | ||
|
||
task :gem_guard do | ||
puts "## Installing Guard." | ||
system "gem install guard" | ||
end | ||
|
||
task :abort do | ||
end | ||
end | ||
|
||
|
||
namespace :guard_rake do | ||
task :install_guard_rake => :gem_guard_rake do | ||
puts "## Guard-Rake installed." | ||
Rake::Task["rb_event:install_rb_fsevent"].invoke | ||
end | ||
|
||
task :gem_guard_rake do | ||
puts "## Installing Guard-Rake." | ||
system "gem install guard-rake" | ||
end | ||
|
||
task :abort do | ||
end | ||
end | ||
|
||
|
||
namespace :rb_event do | ||
task :install_rb_fsevent => :gem_rb_fsevent do | ||
puts "## rb-fsevent for Growl installed." | ||
Rake::Task["growl_notify:install_growl_notify"].invoke | ||
end | ||
|
||
task :gem_rb_fsevent do | ||
puts "## Installing rb-fsevent for Growl." | ||
system "gem install rb-fsevent" | ||
end | ||
|
||
task :abort do | ||
end | ||
end | ||
|
||
|
||
namespace :growl_notify do | ||
task :install_growl_notify => :gem_growl_notify do | ||
puts "## Growl-Notify installed." | ||
end | ||
|
||
task :gem_growl_notify do | ||
puts "## Installing Growl-Notify." | ||
system "gem install growl_notify" | ||
end | ||
|
||
task :abort do | ||
end | ||
end | ||
|
||
|
||
task :hyde_aborted do | ||
puts "Thank you, please shop again." | ||
end |
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,7 @@ | ||
guard 'rake', :task => 'parse_haml' do | ||
watch(%r{_source/_layouts/haml/}) | ||
end | ||
|
||
guard 'rake', :task => 'parse_sass' do | ||
watch(%r{_source/css/sass/}) | ||
end |
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,31 @@ | ||
desc "Parse templates" | ||
task :parse_templates => [:parse_haml] do | ||
puts "Haml and Sass have been parsified..." | ||
end | ||
|
||
desc "Parse haml layouts" | ||
task :parse_haml => [:parse_sass] do | ||
puts "Parsing Haml layouts..." | ||
system(%{ | ||
cd _source/_layouts/haml && for f in *.haml; | ||
do [ -e $f ] && haml $f ../${f%.haml}.html; done | ||
}) | ||
end | ||
|
||
desc "Parse sass" | ||
task :parse_sass do | ||
puts "Parsing Sass layouts..." | ||
system "sass _source/css/sass/style.scss _source/css/style.css" | ||
end | ||
|
||
desc "Launch preview environment" | ||
task :preview do | ||
Rake::Task["parse_haml"].invoke | ||
system "jekyll --auto --server" | ||
end | ||
|
||
desc "Build site" | ||
task :build do |task, args| | ||
Rake::Task["parse_haml"].invoke | ||
system "jekyll" | ||
end |
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,41 @@ | ||
safe: false | ||
auto: false | ||
server: false | ||
server_port: 4000 | ||
base-url: / | ||
|
||
|
||
source: _source | ||
destination: _public | ||
plugins: _plugins | ||
|
||
future: true | ||
lsi: false | ||
pygments: true | ||
markdown: maruku | ||
permalink: date | ||
|
||
maruku: | ||
use_tex: false | ||
use_divs: false | ||
png_engine: blahtex | ||
png_dir: images/latex | ||
png_url: /images/latex | ||
|
||
rdiscount: | ||
extensions: [] | ||
|
||
kramdown: | ||
auto_ids: true, | ||
footnote_nr: 1 | ||
entity_output: as_char | ||
toc_levels: 1..6 | ||
use_coderay: false | ||
|
||
coderay: | ||
coderay_wrap: div | ||
coderay_line_numbers: inline | ||
coderay_line_numbers_start: 1 | ||
coderay_tab_width: 4 | ||
coderay_bold_every: 10 | ||
coderay_css: style |
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,39 @@ | ||
module Jekyll | ||
require 'haml' | ||
class HamlConverter < Converter | ||
safe true | ||
priority :low | ||
|
||
def matches(ext) | ||
ext =~ /haml/i | ||
end | ||
|
||
def output_ext(ext) | ||
".html" | ||
end | ||
|
||
def convert(content) | ||
engine = Haml::Engine.new(content) | ||
engine.render | ||
end | ||
end | ||
|
||
require 'sass' | ||
class SassConverter < Converter | ||
safe true | ||
priority :low | ||
|
||
def matches(ext) | ||
ext =~ /sass/i | ||
end | ||
|
||
def output_ext(ext) | ||
".css" | ||
end | ||
|
||
def convert(content) | ||
engine = Sass::Engine.new(content) | ||
engine.render | ||
end | ||
end | ||
end |
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,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Hello Mr. Hyde</title> | ||
<link href='/css/bootstrap.css' rel='stylesheet' type='text/css' /> | ||
<link href='/css/style.css' rel='stylesheet' type='text/css' /> | ||
</head> | ||
<body> | ||
<div id='post'> | ||
<div id='date'>published 22 Sep 2011</div> | ||
<p> | ||
<p>Hello Mr Hyde.</p> | ||
</p> | ||
</div> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.