From 708ae28d8a5c9d79958af71b23a26848984824e9 Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Wed, 26 Dec 2012 15:13:57 -0700 Subject: [PATCH] A better way to preview and release the Jekyll site. --- .gitignore | 2 ++ Rakefile | 43 ++++++++++++++++++++++++ site/CNAME | 1 + site/README | 1 + site/_config.yml | 2 ++ site/css/960.css | 1 + site/css/reset.css | 1 + site/css/screen.css | 81 +++++++++++++++++++++++++++++++++++++++++++++ site/css/text.css | 1 + site/index.html | 40 ++++++++++++++++++++++ 10 files changed, 173 insertions(+) create mode 100644 site/CNAME create mode 100644 site/README create mode 100644 site/_config.yml create mode 100644 site/css/960.css create mode 100755 site/css/reset.css create mode 100644 site/css/screen.css create mode 100755 site/css/text.css create mode 100644 site/index.html diff --git a/.gitignore b/.gitignore index ab54fd1b..9c7a17eb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ _site/ .bundle/ .DS_Store bbin/ +gh-pages/ +site/_site/ diff --git a/Rakefile b/Rakefile index 8eb1360d..5ef52dc8 100644 --- a/Rakefile +++ b/Rakefile @@ -109,6 +109,49 @@ rescue LoadError end end +############################################################################# +# +# Site tasks - http://jekyllrb.com +# +############################################################################# + +desc "Generate and view the site locally" +task :site do + # Yep, it's a hack! Wait a few seconds for the Jekyll site to generate and + # then open it in a browser. Someday we can do better than this, I hope. + Thread.new do + sleep 4 + puts "Opening in browser..." + sh "open http://localhost:4000" + end + + # Generate the site in server mode. + puts "Running Jekyll..." + sh "cd site && jekyll --server" +end + +desc "Commit the local site to the gh-pages branch and deploy" +task :site_release do + # Ensure the gh-pages dir exists so we can generate into it. + puts "Checking for gh-pages dir..." + unless File.exist?("./gh-pages") + puts "No gh-pages directory found. Run the following commands first:" + puts " `git clone git@github.com:mojombo/god gh-pages" + puts " `cd gh-pages" + puts " `git checkout gh-pages`" + exit(1) + end + + # Copy the rest of the site over. + puts "Copying static..." + sh "cp -R site/* gh-pages/" + + # Commit the changes + sha = `git log`.match(/[a-z0-9]{40}/)[0] + sh "cd gh-pages && git add . && git commit -m 'Updating to #{sha}.' && git push" + puts 'Done.' +end + ############################################################################# # # Packaging tasks diff --git a/site/CNAME b/site/CNAME new file mode 100644 index 00000000..f501cdec --- /dev/null +++ b/site/CNAME @@ -0,0 +1 @@ +jekyllrb.com diff --git a/site/README b/site/README new file mode 100644 index 00000000..60b411cb --- /dev/null +++ b/site/README @@ -0,0 +1 @@ +Jekyll's awesome website. diff --git a/site/_config.yml b/site/_config.yml new file mode 100644 index 00000000..2fc224a9 --- /dev/null +++ b/site/_config.yml @@ -0,0 +1,2 @@ +auto: true +server: true diff --git a/site/css/960.css b/site/css/960.css new file mode 100644 index 00000000..dac2d0d8 --- /dev/null +++ b/site/css/960.css @@ -0,0 +1 @@ +.container_12,.container_16{margin-left:auto;margin-right:auto;width:960px}.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12,.grid_13,.grid_14,.grid_15,.grid_16{display:inline;float:left;margin-left:10px;margin-right:10px}.container_12 .grid_3,.container_16 .grid_4{width:220px}.container_12 .grid_6,.container_16 .grid_8{width:460px}.container_12 .grid_9,.container_16 .grid_12{width:700px}.container_12 .grid_12,.container_16 .grid_16{width:940px}.alpha{margin-left:0}.omega{margin-right:0}.container_12 .grid_1{width:60px}.container_12 .grid_2{width:140px}.container_12 .grid_4{width:300px}.container_12 .grid_5{width:380px}.container_12 .grid_7{width:540px}.container_12 .grid_8{width:620px}.container_12 .grid_10{width:780px}.container_12 .grid_11{width:860px}.container_16 .grid_1{width:40px}.container_16 .grid_2{width:100px}.container_16 .grid_3{width:160px}.container_16 .grid_5{width:280px}.container_16 .grid_6{width:340px}.container_16 .grid_7{width:400px}.container_16 .grid_9{width:520px}.container_16 .grid_10{width:580px}.container_16 .grid_11{width:640px}.container_16 .grid_13{width:760px}.container_16 .grid_14{width:820px}.container_16 .grid_15{width:880px}.container_12 .prefix_3,.container_16 .prefix_4{padding-left:240px}.container_12 .prefix_6,.container_16 .prefix_8{padding-left:480px}.container_12 .prefix_9,.container_16 .prefix_12{padding-left:720px}.container_12 .prefix_1{padding-left:80px}.container_12 .prefix_2{padding-left:160px}.container_12 .prefix_4{padding-left:320px}.container_12 .prefix_5{padding-left:400px}.container_12 .prefix_7{padding-left:560px}.container_12 .prefix_8{padding-left:640px}.container_12 .prefix_10{padding-left:800px}.container_12 .prefix_11{padding-left:880px}.container_16 .prefix_1{padding-left:60px}.container_16 .prefix_2{padding-left:120px}.container_16 .prefix_3{padding-left:180px}.container_16 .prefix_5{padding-left:300px}.container_16 .prefix_6{padding-left:360px}.container_16 .prefix_7{padding-left:420px}.container_16 .prefix_9{padding-left:540px}.container_16 .prefix_10{padding-left:600px}.container_16 .prefix_11{padding-left:660px}.container_16 .prefix_13{padding-left:780px}.container_16 .prefix_14{padding-left:840px}.container_16 .prefix_15{padding-left:900px}.container_12 .suffix_3,.container_16 .suffix_4{padding-right:240px}.container_12 .suffix_6,.container_16 .suffix_8{padding-right:480px}.container_12 .suffix_9,.container_16 .suffix_12{padding-right:720px}.container_12 .suffix_1{padding-right:80px}.container_12 .suffix_2{padding-right:160px}.container_12 .suffix_4{padding-right:320px}.container_12 .suffix_5{padding-right:400px}.container_12 .suffix_7{padding-right:560px}.container_12 .suffix_8{padding-right:640px}.container_12 .suffix_10{padding-right:800px}.container_12 .suffix_11{padding-right:880px}.container_16 .suffix_1{padding-right:60px}.container_16 .suffix_2{padding-right:120px}.container_16 .suffix_3{padding-right:180px}.container_16 .suffix_5{padding-right:300px}.container_16 .suffix_6{padding-right:360px}.container_16 .suffix_7{padding-right:420px}.container_16 .suffix_9{padding-right:540px}.container_16 .suffix_10{padding-right:600px}.container_16 .suffix_11{padding-right:660px}.container_16 .suffix_13{padding-right:780px}.container_16 .suffix_14{padding-right:840px}.container_16 .suffix_15{padding-right:900px}.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.clearfix:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.clearfix{display:inline-block}* html .clearfix{height:1%}.clearfix{display:block} \ No newline at end of file diff --git a/site/css/reset.css b/site/css/reset.css new file mode 100755 index 00000000..99a02116 --- /dev/null +++ b/site/css/reset.css @@ -0,0 +1 @@ +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0} \ No newline at end of file diff --git a/site/css/screen.css b/site/css/screen.css new file mode 100644 index 00000000..bb37f6b7 --- /dev/null +++ b/site/css/screen.css @@ -0,0 +1,81 @@ +#left { + background: #ddd; + color: #000; + text-align: right; + float: left; +} + +#right { + background: #000; + color: #ddd; + left: 50%; + text-align: left; + float: right; +} + +#left_bg { + background: #ddd; + color: #000; +} + +#right_bg { + left: 50%; + background: #000; + color: #ddd; +} + +.bg { + width: 50%; + position: absolute; + height: 100%; +} +.middle { + width: 50%; + font-size: 10em; + font-family: Georgia, Times, sans-serif; +} + +p { + font-size: 10%; + font-family: Verdana, serif; + margin-top: 50px; + margin-left: 3px; + margin-right: 3px; +} + +ul { + font-size: 25%; + font-family: Verdana, serif; + margin-top: 50px; +} + +ul li { + margin: 10px; +} +.container { + top: 0; + left: 0; + width: 100%; + height: 100%; + position: fixed; + display: table; +} + +.center { + text-align:center; + display: table-cell; + vertical-align: middle; +} + +a { +text-decoration: none; +color: inherit; +} + +a:visited { +color: inherit; +} + +a:hover { +color: #8b0000; +} diff --git a/site/css/text.css b/site/css/text.css new file mode 100755 index 00000000..b024b8cc --- /dev/null +++ b/site/css/text.css @@ -0,0 +1 @@ +body{font:13px/1.5 Helvetica,Arial,'Liberation Sans',FreeSans,sans-serif}a:focus{outline:1px dotted invert}hr{border:0 #ccc solid;border-top-width:1px;clear:both;height:0}h1{font-size:25px}h2{font-size:23px}h3{font-size:21px}h4{font-size:19px}h5{font-size:17px}h6{font-size:15px}ol{list-style:decimal}ul{list-style:square}li{margin-left:30px}p,dl,hr,h1,h2,h3,h4,h5,h6,ol,ul,pre,table,address,fieldset{margin-bottom:20px} \ No newline at end of file diff --git a/site/index.html b/site/index.html new file mode 100644 index 00000000..d1fb0499 --- /dev/null +++ b/site/index.html @@ -0,0 +1,40 @@ + + + + + + jekyll + + + + + +
+
+
+
+
+ jek +

+ transform your text +

+ +
+ +
+
+ +