Make template site HTML5

It would really pain me if the default Jekyll site were XHTML. That'd be bad for the internet.

Instead, use Twitter Bootstrap as a base (while still keeping @mojombo's origin design), to give users a great initial baseline to build beautiful, simple sites.

Defaults are more than just the starting point. It's what 80% of users are going to use. Look at WordPress and the default theme. May as well lead by example and start the user off right.

* Add Bootstrap base CSS as a better reset and base layer
* Update default layout to HTML5 with boilerplate best practices
* Add title and post date to post.html (rather than including in the post itself)
* Make site title a variable and add to _config.yml
* Add page title to header
* Add default .gitignore to ignore `_site`
* Remove unused `rss.png` and `.gitkeep`
* Add Modernizr for legacy IE support
This commit is contained in:
Benjamin J. Balter 2013-04-13 13:15:31 -04:00
parent 485b37e3d1
commit 1163fa905e
15 changed files with 112 additions and 41 deletions

1
lib/site_template/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
_site

View File

@ -1 +1,2 @@
name: Your New Jekyll Site
pygments: true

View File

@ -1,38 +1,63 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>{{ page.title }}</title>
<!-- syntax highlighting CSS -->
<link rel="stylesheet" href="/css/syntax.css" type="text/css" />
<!-- Homepage CSS -->
<link rel="stylesheet" href="/css/screen.css" type="text/css" media="screen, projection" />
</head>
<body>
<div class="site">
<div class="title">
<a href="/">Your Name</a>
<a class="extra" href="/">home</a>
</div>
{{ content }}
<div class="footer">
<div class="contact">
<p>
Your Name<br />
What You Are<br />
your@email.com
</p>
</div>
<div class="contact">
<p>
<a href="http://github.com/yourusername/">github.com/yourusername</a><br />
<a href="http://twitter.com/yourusername/">twitter.com/yourusername</a><br />
</p>
</div>
</div>
</div>
<a href="http://github.com/yourusername"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a>
</body>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{ page.title }}</title>
<meta name="viewport" content="width=device-width">
<!-- Bootstrap base CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-responsive.min.css">
<!-- syntax highlighting CSS -->
<link rel="stylesheet" href="/css/syntax.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="/css/main.css">
<script src="js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
</head>
<body>
<!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<![endif]-->
<div class="container">
<div class="site">
<div class="title">
<a href="/">{{ site.name }}</a>
<a class="extra" href="/">home</a>
</div>
{{ content }}
<footer>
<div class="contact">
<p>
Your Name<br />
What You Are<br />
your@email.com
</p>
</div>
<div class="contact">
<p>
<a href="http://github.com/yourusername/">github.com/yourusername</a><br />
<a href="http://twitter.com/yourusername/">twitter.com/yourusername</a><br />
</p>
</div>
</footer>
</div> <!-- /container -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.9.1.min.js"><\/script>')</script>
<script src="js/vendor/bootstrap.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>

View File

@ -1,6 +1,9 @@
---
layout: default
---
<h2>{{ page.title }}</h2>
<p class="meta">{{ page.date | date_to_string }}</p>
<div id="post">
{{ content }}
</div>

File diff suppressed because one or more lines are too long

9
lib/site_template/css/bootstrap.min.css vendored Executable file

File diff suppressed because one or more lines are too long

View File

@ -115,7 +115,7 @@ ul.posts {
color: #aaa;
}
.site .footer {
.site footer {
font-size: 80%;
color: #666;
border-top: 4px solid #eee;
@ -123,22 +123,22 @@ ul.posts {
overflow: hidden;
}
.site .footer .contact {
.site footer .contact {
float: left;
margin-right: 3em;
}
.site .footer .contact a {
.site footer .contact a {
color: #8085C1;
}
.site .footer .rss {
.site footer .rss {
margin-top: 1.1em;
margin-right: -.2em;
float: right;
}
.site .footer .rss img {
.site footer .rss img {
border: 0;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

1
lib/site_template/js/main.js Executable file
View File

@ -0,0 +1 @@

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long