Skip to content

Commit

Permalink
Merge pull request #61 from mbbx6spp/gh-pages
Browse files Browse the repository at this point in the history
Create basic, functional GitHub Pages site and layout
  • Loading branch information
krestenkrab committed Nov 4, 2011
2 parents 4341c47 + f9203c1 commit 10e163f
Show file tree
Hide file tree
Showing 480 changed files with 209,565 additions and 91 deletions.
1 change: 1 addition & 0 deletions CNAME
@@ -0,0 +1 @@
erjang.org
5 changes: 5 additions & 0 deletions _config.yml
@@ -0,0 +1,5 @@
permalink: /:year/:month/:title/
paginate: 10
exclude:
name: Erjang - Erlang on the JVM
baseurl: /erjang
4 changes: 4 additions & 0 deletions _includes/footer.html
@@ -0,0 +1,4 @@
</div><!--container-->

</body>
</html>
22 changes: 22 additions & 0 deletions _includes/header.html
@@ -0,0 +1,22 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.name }}</title>

<link rel="stylesheet" href="{{ site.baseurl }}/bootstrap.min.css">
<link rel="stylesheet" href="{{ site.baseurl }}/css.css">
</head>
<body>

{% if site.baseurl == null %}
{% assign linkhome = "/" %}
{% else %}
{% assign linkhome = site.baseurl %}
{% endif %}

<header>
<h1><a href="{{ linkhome }}">{{ site.name }}</a></h1>
</header>

<div class="container">
23 changes: 23 additions & 0 deletions _includes/post.html
@@ -0,0 +1,23 @@
{% if page.is_index %}{% assign content = post.content %}{% endif %}
<div class="span11 content">
<div class="page-header">
{% if post.title %}<h3 class="title">{% if page.is_index %}<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>{% else %}{{ post.title}}{% endif %}</h3>{% endif %}
</div>
<div class="post_content">
{% if page.is_index %}
{% if post.summary %}{{ post.summary }}
{% else %}
{{ content }}
{% endif %}
{% else %}
{{ content }}
{% endif %}
</div>
</div><!--content-->

<div class="span5 sidebar">
<h4>Published on {{ post.date | date:'%d %B %Y' }}</h4>
{% for category in post.categories %}
<h6>{{ category }}</h6>
{% endfor %}
</div>
4 changes: 4 additions & 0 deletions _layouts/default.html
@@ -0,0 +1,4 @@
{% include header.html %}
{% assign post = page %}
{% include post.html %}
{% include footer.html %}
9 changes: 9 additions & 0 deletions _posts/2011/2011-08-03-first-post.mdown
@@ -0,0 +1,9 @@
---

title: This is the title
layout: default
categories: first-category second

---

This is the first post woohoo
8 changes: 8 additions & 0 deletions _posts/2011/2011-09-01-second.md
@@ -0,0 +1,8 @@
---

title: Second
layout: default

---

in circuit theory, thevanin theorem for linear electrical networks states that any combination of voltage sources, current sources, and resistors with two terminals is electrically equivalent to a single voltage source v and a single series resistor r. for single frequency ac systems the theorem can also be applied to general impedances, not just resistors. the theorem was first discovered by german scientist hermann von helmholtz in 1853, but was then rediscovered in 1883 by french telegraph engineer charles Thevanin (1857.1926). This theorem states that a circuit of voltage sources and resistors can be converted into a Thevanin equivalent, which is a simplification technique used in circuit analysis. the Thevanin equivalent can be used as a good model for a power supply or battery (with the resistor representing the internal impedance and the source representing the electromotive force). the circuit consists of an ideal voltage source in series with an ideal resistor.
21 changes: 21 additions & 0 deletions _posts/2011/2011-09-02-testing-markdown.md
@@ -0,0 +1,21 @@
---

title: Testing Markdown
layout: default

---

###Testing some markdown this is h3

So, *time* for **some** `lists`
- this
- is a
- list

> block quote.
>
> another line
This is a [link](#).

jekyll --server
40 changes: 40 additions & 0 deletions _posts/2011/2011-09-03-introducing-jekyll-bootstrap.md
@@ -0,0 +1,40 @@
---

title: Introducing Jekyll Bootstrap
layout: default

---

Jekyll bootstrap is a theme for jekyll which uses the [twitter bootstrap css framework](https://github.com/twitter/bootstrap).
The advantage of jekyll is that it is self hosted (or hosted on github) and that you can write in markdown on a text editor and just git push new posts to a server which produces html files. The advantage of this theme is so that you can start blogging almost right away without having to worry about making a theme.

###Setting up
To start you own blog, simply `git clone` the [repository on github](https://github.com/nhoss2/jekyll-bootstrap). You could also press the "fork" button on github.

git clone git://github.com/nhoss2/jekyll-bootstrap.git

If you want to have your blog on github, make sure you change to the `gh-pages` branch.

git checkout gh-pages

Then you will need to edit the `_config.yml` file at the root of repository.

To add your own posts, add a file to the `_posts` directory which has the name `year-month-day-title.md`. Note - the file does not have to markdown.

To publish the post, just `git push` it to your own github repo and your set!

###Things to change on `_config.yml`
There is a config file at the root called `_config.yml`. By Default it looks like:

permalink: /:year/:title/
paginate: 10
exclude:
name: Jekyll Bootstrap
baseurl: /jekyll-bootstrap/

You will need to change the `name` and `baseurl` fields. The others are optional.
The `baseurl` field is used for the css files and pagination, if you are hosting the blog on github, you will need to change it to your repository name unless your repository is the same name as your github user name, which means you will need to have no value for `baseurl`.

For more information on Jekyll, visit their [wiki on github](https://github.com/mojombo/jekyll/wiki).

For more information on github pages: [http://pages.github.com](http://pages.github.com).
94 changes: 94 additions & 0 deletions blog/index.html
@@ -0,0 +1,94 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Erjang: Erlang on the Java&trade; Virtual Machine</title>

<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!-- Le styles -->
<link href="/erjang/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
/* Override some defaults */
html, body {
background-color: #eee;
}
body {
padding-top: 40px; /* 40px to make the container go all the way to the bottom of the topbar */
}
.container > footer p {
text-align: center; /* center align it with the container */
}
.container {
width: 820px; /* downsize our container to make the content feel a bit tighter and more cohesive. NOTE: this removes two full columns from the grid, meaning you only go to 14 columns and not 16. */
}

/* The white background content wrapper */
.content {
background-color: #fff;
padding: 20px;
margin: 0 -20px; /* negative indent the amount of the padding to maintain the grid system */
-webkit-border-radius: 0 0 6px 6px;
-moz-border-radius: 0 0 6px 6px;
border-radius: 0 0 6px 6px;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
box-shadow: 0 1px 2px rgba(0,0,0,.15);
}

/* Page header tweaks */
.page-header {
background-color: #f5f5f5;
padding: 20px 20px 10px;
margin: -20px -20px 20px;
}

/* Styles you shouldn't keep as they are for displaying this base example only */
.content .span10,
.content .span4 {
min-height: 500px;
}
/* Give a quick and non-cross-browser friendly divider */
.content .span4 {
margin-left: 0;
padding-left: 19px;
border-left: 1px solid #eee;
}

.topbar .btn {
border: 0;
}

</style>
</head>

<body>

<div class="topbar">
<div class="fill">
<div class="container">
<a class="brand" href="/">Erjang</a>
<ul class="nav">
<li><a href="/">Home</a></li>
<li class="active"><a href="/blog">Blog</a></li>
<li><a href="/doc">Javadocs</a></li>
</ul>
</div>
</div>
</div>

<div class="container">
<div class="content">
<div class="page-header">
<h1>Blog<small>Coming Soon</small></h1>
</div>
</div>

<footer>
</footer>
</div> <!-- /container -->
</body>
</html>
28 changes: 28 additions & 0 deletions blog/posts.html
@@ -0,0 +1,28 @@
---
layout: nil
is_index: true
---


{% include header.html %}
{% for post in paginator.posts %}
{% include post.html %}
{% endfor %}

<div class="pagination" id="bottom_page">
<ul>
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<li class="previous"><a href="{{ site.baseurl }}">&larr; Previous</a></li>
{% else %}
<li class="previous"><a href="{{ site.baseurl }}/page{{ paginator.previous_page }}">&larr; Previous</a></li>
{% endif %}
{% endif %}
<li><p>Page {{ paginator.page }} of {{ paginator.total_pages }}</p></li>
{% if paginator.next_page %}
<li class="next"><a href="{{ site.basurl }}/page{{ paginator.next_page }}">Next &rarr;</a></li>
{% endif %}
</ul>
</div>

{% include footer.html %}

0 comments on commit 10e163f

Please sign in to comment.