Skip to content

Commit

Permalink
feat(jekyll): Major update for Jekyll
Browse files Browse the repository at this point in the history
Changed the theme to Jekyll from the default theme to Lanyon based on
Poole from mdo. Also added a couple other files needed for a basic
website: robots.txt, sitemap, atom feed etc. Updated the gulpfile and
config.yml files accordingly.

Also some minor changes here and there for some other files, including
asking the user for a URL to their site used when making the .xml files
and such. This bumps the version to 0.4.0.
  • Loading branch information
sondr3 committed Mar 8, 2014
1 parent d6983b3 commit 05d928a
Show file tree
Hide file tree
Showing 34 changed files with 1,559 additions and 1,738 deletions.
6 changes: 5 additions & 1 deletion app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,14 @@ JekyllizeGenerator.prototype.askForProject = function askForProject() {
}, {
name: 'tagline',
message: 'What is the tagline of your project?'
}, {
name: 'projecturl',
message: 'What will the address for your site be?'
}], function (props) {
this.projectname = props.projectname;
this.description = props.description;
this.tagline = props.tagline;
this.projecturl = props.projecturl;

cb();
}.bind(this));
Expand Down Expand Up @@ -194,7 +198,7 @@ JekyllizeGenerator.prototype.askForJekyll = function askForJekyll() {
}, {
name: 'jekyllPageinate',
message: 'Number of posts to show on the home page',
default: 'all',
default: '10',
validate: function (input) {
if (/^[0-9]*$/.test(input)) {
return true;
Expand Down
2 changes: 1 addition & 1 deletion app/templates/Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source "http://rubygems.org"

gem 'jekyll', '~>1.4.0'
gem 'redcarpet'
gem 'redcarpet'
14 changes: 10 additions & 4 deletions app/templates/_config.build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Jekyll configuration precedence:
# 1. Gruntfile task
# 2. config.build.yml
# 3. config.yml
# Run during the 'gulp build' command
# Overrides these options in the

# Overrides the default URL, needed for your atom feed and sitemap
url: <%= projecturl %>

# Hides your drafts and future posts
future: false
show_drafts: false
# Gives you more accurate related posts
lsi: true
# Removes the upper limit for posts generated
limit_posts: 0

source: 'src'
destination: 'serve'
34 changes: 20 additions & 14 deletions app/templates/_config.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Jekyll configuration precedence:
# 1. gulpfile
# 2. config.build.yml
# 3. config.yml

name: <%= projectname %>
# Title, decription, tagline and URL for your site
# Can be used in your theme by calling 'site.title' and so on
title: <%= projectname %>
description: <%= description %>
tagline: <%= tagline %>
url: localhost:4000

# Used so Gulp knows where our app lives
source: 'src'
destination: 'serve'
# Used so Jekyll outputs the site correctly so Gulp can do what it wants
source: src
destination: serve

# Same as the title etc for your site but can instead be
# called by using 'site.owner.name' and so on
owner:
name: <%= ownerName %>
email: <%= ownerEmail %>
Expand All @@ -20,11 +20,18 @@ owner:
# general setting for Jekyll
googleAnalytics: UA-XXXXX-X

# _config.build.yml sets future and show_drafts to false on `grunt build`
# _config.build.yml overwrites these options when you run `gulp build`
# Enables future posts (posts with dates in the future) and drafts
future: true
show_drafts: true<% if (jekyllPageinate) { %>

permalink: <%= jekyllPermalinks %>
show_drafts: true
# Disables the more accurate related posts for faster generating of the site
lsi: false
# Only make the last 10 posts so generating isn't slow
limit_posts: 10

# Permalink structure and pagination options
relative_permalinks: true
permalink: <%= jekyllPermalinks %><% if (jekyllPageinate) { %>
paginate: <%= jekyllPageinate %>
paginate_path: 'page:num'<% } %>

Expand All @@ -33,5 +40,4 @@ markdown: redcarpet
# Markdown library options
# redcarpet:
# extensions: ['fenced_code_blocks', 'smart']

pygments: true
9 changes: 9 additions & 0 deletions app/templates/app/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
layout: default
title: "404: Page not found"
---

<div class="page">
<h1 class="page-title">404: Page not found</h1>
<p class="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href="/">Head back home</a> to try finding it again.</p>
</div>
132 changes: 132 additions & 0 deletions app/templates/app/_drafts/2014-03-01-example-content.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
---
layout: post
date: 2014-03-01
title: Example content
categories: jekyll example
---


<div class="message">
Howdy! This is an example blog post that shows several types of HTML content supported in this theme.
</div>

Cum sociis natoque penatibus et magnis <a href="#">dis parturient montes</a>, nascetur ridiculus mus. *Aenean eu leo quam.* Pellentesque ornare sem lacinia quam venenatis vestibulum. Sed posuere consectetur est at lobortis. Cras mattis consectetur purus sit amet fermentum.

> Curabitur blandit tempus porttitor. Nullam quis risus eget urna mollis ornare vel eu leo. Nullam id dolor id nibh ultricies vehicula ut id elit.
Etiam porta **sem malesuada magna** mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.

## Inline HTML elements

HTML defines a long list of available inline tags, a complete list of which can be found on the [Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/HTML/Element).

- **To bold text**, use `<strong>`.
- *To italicize text*, use `<em>`.
- Abbreviations, like <abbr title="HyperText Markup Langage">HTML</abbr> should use `<abbr>`, with an optional `title` attribute for the full phrase.
- Citations, like <cite>&mdash; Mark otto</cite>, should use `<cite>`.
- <del>Deleted</del> text should use `<del>` and <ins>inserted</ins> text should use `<ins>`.
- Superscript <sup>text</sup> uses `<sup>` and subscript <sub>text</sub> uses `<sub>`.

Most of these elements are styled by browsers with few modifications on our part.

## Heading

Vivamus sagittis lacus vel augue rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.

### Code

Cum sociis natoque penatibus et magnis dis `code element` montes, nascetur ridiculus mus.

{% highlight js %}
// Example can be run directly in your JavaScript console

// Create a function that takes two arguments and returns the sum of those arguments
var adder = new Function("a", "b", "return a + b");

// Call the function
adder(2, 6);
// > 8
{% endhighlight %}

Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa.

### Gists via GitHub Pages

Vestibulum id ligula porta felis euismod semper. Nullam quis risus eget urna mollis ornare vel eu leo. Donec sed odio dui.

{% gist 5555251 gist.md %}

Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec sed odio dui. Vestibulum id ligula porta felis euismod semper.

### Lists

Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

* Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
* Donec id elit non mi porta gravida at eget metus.
* Nulla vitae elit libero, a pharetra augue.

Donec ullamcorper nulla non metus auctor fringilla. Nulla vitae elit libero, a pharetra augue.

1. Vestibulum id ligula porta felis euismod semper.
2. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
3. Maecenas sed diam eget risus varius blandit sit amet non magna.

Cras mattis consectetur purus sit amet fermentum. Sed posuere consectetur est at lobortis.

<dl>
<dt>HyperText Markup Language (HTML)</dt>
<dd>The language used to describe and define the content of a Web page</dd>

<dt>Cascading Style Sheets (CSS)</dt>
<dd>Used to describe the appearance of Web content</dd>

<dt>JavaScript (JS)</dt>
<dd>The programming language used to build advanced Web sites and applications</dd>
</dl>

Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Nullam quis risus eget urna mollis ornare vel eu leo.

### Tables

Aenean lacinia bibendum nulla sed consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

<table>
<thead>
<tr>
<th>Name</th>
<th>Upvotes</th>
<th>Downvotes</th>
</tr>
</thead>
<tfoot>
<tr>
<td>Totals</td>
<td>21</td>
<td>23</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>Alice</td>
<td>10</td>
<td>11</td>
</tr>
<tr>
<td>Bob</td>
<td>4</td>
<td>3</td>
</tr>
<tr>
<td>Charlie</td>
<td>7</td>
<td>9</td>
</tr>
</tbody>
</table>

Nullam id dolor id nibh ultricies vehicula ut id elit. Sed posuere consectetur est at lobortis. Nullam quis risus eget urna mollis ornare vel eu leo.

-----

Want to see something else added? <a href="https://github.com/poole/poole/issues/new">Open an issue.</a>
31 changes: 31 additions & 0 deletions app/templates/app/_includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<head>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">

<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">

<title>
{% if page.title == "Home" %}
{{ site.title }} &middot; {{ site.tagline }}
{% else %}
{{ page.title }} &middot; {{ site.title }}
{% endif %}
</title>

<!-- CSS -->
<link rel="stylesheet" href="/assets/stylesheets/main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Serif:400,400italic,700|PT+Sans:400">

<!-- build:js ./assets/javascript/all.min.js -->
<!-- <script src="/assets/javascript/javascript.js"></script> -->
<!-- <script src="/assets/javascript/somejavascript.js"></script> -->
<!-- endbuild -->

<!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/assets/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="/assets/favicon.ico">

<!-- RSS -->
<link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml">
</head>
38 changes: 38 additions & 0 deletions app/templates/app/_includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!-- Target for toggling the sidebar `.sidebar-checkbox` is for regular
styles, `#sidebar-checkbox` for behavior. -->
<input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox">

<!-- Toggleable sidebar -->
<div class="sidebar" id="sidebar">
<div class="sidebar-item">
<p>{{ site.description }}</p>
</div>

<nav class="sidebar-nav">
<a class="sidebar-nav-item{% if page.title == "Home" %} active{% endif %}" href="/">Home</a>

{% comment %}
The code below dynamically generates a sidebar nav of pages with
`layout: page` in the front-matter. See readme for usage.
{% endcomment %}

{% assign pages_list = site.pages %}
{% for node in pages_list %}
{% if node.title != null %}
{% if node.layout == "page" %}
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href="{{ node.url }}">{{ node.title }}</a>
{% endif %}
{% endif %}
{% endfor %}

<a class="sidebar-nav-item" href="https://github.com/sondr3/generator-jekyllized">Jekyllized on Github</a>
<a class="sidebar-nav-item" href="https://github.com/poole">Poole on Github</a>
<span class="sidebar-nav-item">Run by <a href="https://twitter.com/{{ site.owner.twitter}}">@{{ site.owner.name }}<a/></span>
</nav>

<div class="sidebar-item">
<p>
&copy; {{ site.time | date: '%Y' }}. All rights reserved.
</p>
</div>
</div>
58 changes: 21 additions & 37 deletions app/templates/app/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,30 @@
<!DOCTYPE html>
<html>
<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">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">

<!-- Custom CSS -->
<link rel="stylesheet" href="/assets/stylesheets/main.css">
{% include head.html %}

<!-- build:js ./assets/javascript/all.min.js -->
<script src="/assets/javascript/fastclick.js"></script>
<script src="/assets/javascript/ngprogress.js"></script>
<!-- endbuild -->
<body>

</head>
<body>
{% include sidebar.html %}

<div class="site">
<div class="header">
<h1 class="title"><a href="/">{{ site.name }}</a></h1>
<a class="extra" href="/">home</a>
</div>
<!-- Wrap is the content to shift when toggling the sidebar. We wrap the
content to avoid any CSS collisions with our real content. -->
<div class="wrap">
<div class="masthead">
<div class="container">
<h3 class="masthead-title">
<a href="/" title="Home">{{ site.title }}</a>
<small>{{ site.tagline }}</small>
</h3>
</div>
</div>

{{ content }}
<div class="container content">
{{ content }}
</div>
</div>

<div class="footer">
<div class="contact">
<p>
Sondre Nilsen<br />
What You Are<br />
[email protected]
</p>
</div>
<div class="contact">
<p>
<a href="https://github.com/yourusername">github.com/yourusername</a><br />
<a href="https://twitter.com/yourusername">twitter.com/yourusername</a><br />
</p>
</div>
</div>
</div>
<label for="sidebar-checkbox" class="sidebar-toggle"></label>

</body>
</body>
</html>
8 changes: 8 additions & 0 deletions app/templates/app/_layouts/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: default
---

<div class="page">
<h1 class="page-title">{{ page.title }}</h1>
{{ content }}
</div>
Loading

0 comments on commit 05d928a

Please sign in to comment.