Compare commits

...
14 Commits
24 changed files with 193 additions and 80 deletions
+4 -2
View File
@@ -1,6 +1,8 @@
source 'https://rubygems.org' source 'https://rubygems.org'
gem 'jekyll' gem 'jekyll'
gem 'jekyll-minibundle' gem 'kramdown'
gem 'coderay' gem 'coderay'
gem 'rake' gem 'rake'
gem 'activesupport'
gem 'stringex'
+8 -8
View File
@@ -16,16 +16,16 @@
General notes and suggestions for customizing Minimal Mistakes. General notes and suggestions for customizing Minimal Mistakes.
## Basic Setup ## Basic Setup for a new Jekyll site
1. [Install Jekyll](http://jekyllrb.com) if you haven't already. 1. [Install Bundler](http://bundler.io) `gem install bundler` and then install [Jekyll](http://jekyllrb.com) and all dependencies `bundle install`.
2. Fork the [Minimal Mistakes repo](http://github.com/mmistakes/minimal-mistakes/) 2. Fork the [Minimal Mistakes repo](http://github.com/mmistakes/minimal-mistakes/fork).
3. Clone the repo you just forked to your computer. 3. Clone the repo you just forked and rename it.
4. Edit `_config.yml` to personalize your site. 4. Edit `_config.yml` to personalize your site.
5. Check out the sample posts in `_posts` to see examples for pulling in large feature images, tags, and other YAML data. 5. Check out the sample posts in `_posts` to see examples for pulling in large feature images, assigning categories and tags, and other YAML data.
6. Read the documentation below for further customization pointers and documentation. 6. Read the documentation below for further customization pointers and documentation.
[Demo the Theme](http://mmistakes.github.io/minimal-mistakes) [Demo the Theme](http://mmistakes.github.io/minimal-mistakes/archive/master.zip)
**Pro-tip:** Delete the `gh-pages` branch after cloning and start fresh by branching off `master`. There is a bunch of garbage in `gh-pages` used for the theme's demo site that I'm guessing you don't want on your site. **Pro-tip:** Delete the `gh-pages` branch after cloning and start fresh by branching off `master`. There is a bunch of garbage in `gh-pages` used for the theme's demo site that I'm guessing you don't want on your site.
@@ -34,7 +34,7 @@ General notes and suggestions for customizing Minimal Mistakes.
## Setup for an Existing Jekyll site ## Setup for an Existing Jekyll site
1. Clone the following folders: `_includes`, `_layouts`, `assets`, and `images`. 1. Clone the following folders: `_includes`, `_layouts`, `assets`, and `images`.
2. Clone the following files and personalize content as need: `about.md`, `articles.html`, `index.md`, `feed.xml`, `sitemap.xml` 2. Clone the following files and personalize content as need: `about.md`, `posts.md`, `index.md`, `feed.xml`, `sitemap.xml`
3. Set the following variables in your `config.yml` file: 3. Set the following variables in your `config.yml` file:
``` yaml ``` yaml
@@ -71,7 +71,7 @@ bing_verify:
# For external links add external: true # For external links add external: true
links: links:
- title: Theme Setup - title: Theme Setup
url: /theme-setup url: /theme-setup/
- title: External Link - title: External Link
url: http://mademistakes.com url: http://mademistakes.com
external: true external: true
+88
View File
@@ -0,0 +1,88 @@
require "rubygems"
require "bundler/setup"
require "stringex"
## -- Config -- ##
posts_dir = "_posts" # directory for blog files
new_post_ext = "md" # default new post file extension when using the new_post task
new_page_ext = "md" # default new page file extension when using the new_page task
#############################
# Create a new Post or Page #
#############################
# usage rake new_post
desc "Create a new post in #{posts_dir}"
task :new_post, :title do |t, args|
if args.title
title = args.title
else
title = get_stdin("Enter a title for your post: ")
end
filename = "#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.#{new_post_ext}"
if File.exist?(filename)
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
end
tags = get_stdin("Enter tags to classify your post (comma separated): ")
puts "Creating new post: #{filename}"
open(filename, 'w') do |post|
post.puts "---"
post.puts "layout: post"
post.puts "title: \"#{title.gsub(/&/,'&')}\""
post.puts "modified: #{Time.now.strftime('%Y-%m-%d %H:%M:%S %z')}"
post.puts "tags: [#{tags}]"
post.puts "image:"
post.puts " feature: "
post.puts " credit: "
post.puts " creditlink: "
post.puts "comments: "
post.puts "share: "
post.puts "---"
end
end
# usage rake new_page
desc "Create a new page"
task :new_page, :title do |t, args|
if args.title
title = args.title
else
title = get_stdin("Enter a title for your page: ")
end
filename = "#{title.to_url}.#{new_page_ext}"
if File.exist?(filename)
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
end
tags = get_stdin("Enter tags to classify your page (comma separated): ")
puts "Creating new page: #{filename}"
open(filename, 'w') do |page|
page.puts "---"
page.puts "layout: page"
page.puts "permalink: /#{title.to_url}/"
page.puts "title: \"#{title}\""
page.puts "modified: #{Time.now.strftime('%Y-%m-%d %H:%M')}"
page.puts "tags: [#{tags}]"
page.puts "image:"
page.puts " feature: "
page.puts " credit: "
page.puts " creditlink: "
page.puts "share: "
page.puts "---"
end
end
def get_stdin(message)
print message
STDIN.gets.chomp
end
def ask(message, valid_options)
if valid_options
answer = get_stdin("#{message} #{valid_options.to_s.gsub(/"/, '').gsub(/, /,'/')} ") while !valid_options.include?(answer)
else
answer = get_stdin(message)
end
answer
end
+3 -3
View File
@@ -32,8 +32,8 @@ bing_verify:
links: links:
- title: About - title: About
url: /about/ url: /about/
- title: Articles - title: Posts
url: /articles/ url: /posts/
- title: Theme Setup - title: Theme Setup
url: /theme-setup/ url: /theme-setup/
- title: Made Mistakes - title: Made Mistakes
@@ -47,7 +47,7 @@ pygments: true
markdown: kramdown markdown: kramdown
# https://github.com/mojombo/jekyll/wiki/Permalinks # https://github.com/mojombo/jekyll/wiki/Permalinks
permalink: /:categories/:title permalink: /:categories/:title/
kramdown: kramdown:
auto_ids: true auto_ids: true
+1 -1
View File
@@ -7,5 +7,5 @@
{% if site.owner.linkedin %}<a href="http://linkedin.com/in/{{ site.owner.linkedin }}" class="author-social" target="_blank"><i class="icon-linkedin"></i> LinkedIn</a>{% endif %} {% if site.owner.linkedin %}<a href="http://linkedin.com/in/{{ site.owner.linkedin }}" class="author-social" target="_blank"><i class="icon-linkedin"></i> LinkedIn</a>{% endif %}
{% if site.owner.instagram %}<a href="http://instagram.com/{{ site.owner.instagram }}" class="author-social" target="_blank"><i class="icon-instagram"></i> Instagram</a>{% endif %} {% if site.owner.instagram %}<a href="http://instagram.com/{{ site.owner.instagram }}" class="author-social" target="_blank"><i class="icon-instagram"></i> Instagram</a>{% endif %}
{% if site.owner.github %}<a href="http://github.com/{{ site.owner.github }}" class="author-social" target="_blank"><i class="icon-github"></i> Github</a>{% endif %} {% if site.owner.github %}<a href="http://github.com/{{ site.owner.github }}" class="author-social" target="_blank"><i class="icon-github"></i> Github</a>{% endif %}
{% if site.owner.lastfm %}<a href="http://lastfm.com/{{ site.owner.lastfm }}" class="author-social" target="_blank"><i class="icon-lastfm"></i> Last.fm</a>{% endif %} {% if site.owner.lastfm %}<a href="http://lastfm.com/user/{{ site.owner.lastfm }}" class="author-social" target="_blank"><i class="icon-lastfm"></i> Last.fm</a>{% endif %}
{% if site.owner.tumblr %}<a href="http://{{ site.owner.tumblr }}.tumblr.com" class="author-social" target="_blank"><i class="icon-tumblr"></i> Tumblr</a>{% endif %} {% if site.owner.tumblr %}<a href="http://{{ site.owner.tumblr }}.tumblr.com" class="author-social" target="_blank"><i class="icon-tumblr"></i> Tumblr</a>{% endif %}
+1 -1
View File
@@ -3,7 +3,7 @@
<a href="{{ site.url }}">{{ site.title }}</a> <a href="{{ site.url }}">{{ site.title }}</a>
</div><!-- /.site-name --> </div><!-- /.site-name -->
<div class="top-navigation"> <div class="top-navigation">
<nav role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement"> <nav role="navigation">
<ul> <ul>
{% for link in site.links %} {% for link in site.links %}
<li><a href="{% if link.external %}{{ link.url }}{% else %}{{ site.url }}{{ link.url }}{% endif %}" {% if link.external %}target="_blank"{% endif %}>{{ link.title }}</a></li> <li><a href="{% if link.external %}{{ link.url }}{% else %}{{ site.url }}{{ link.url }}{% endif %}" {% if link.external %}target="_blank"{% endif %}>{{ link.title }}</a></li>
+6 -6
View File
@@ -7,14 +7,14 @@
{% include _head.html %} {% include _head.html %}
</head> </head>
<body class="home" itemscope itemtype="http://schema.org/WebPage"> <body class="home">
{% include _browser-upgrade.html %} {% include _browser-upgrade.html %}
{% include _navigation.html %} {% include _navigation.html %}
{% if page.image.feature %}<div class="image-wrap"> {% if page.image.feature %}<div class="image-wrap">
<img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }} feature image" itemprop="primaryImageOfPage"> <img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }} feature image">
{% if page.image.credit %}<span class="image-credit">Photo Credit: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></span>{% endif %} {% if page.image.credit %}<span class="image-credit">Photo Credit: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></span>{% endif %}
</div><!-- /.image-wrap -->{% endif %} </div><!-- /.image-wrap -->{% endif %}
@@ -22,12 +22,12 @@
{% include _author-bio.html %} {% include _author-bio.html %}
</div> </div>
<div id="index" itemprop="mainContentOfPage" itemscope itemtype="http://schema.org/Blog"> <div id="index">
<h3><a href="{{ site.url}}/articles/">Articles</a></h3> <h3><a href="{{ site.url}}/articles/">Articles</a></h3>
{% for post in site.posts limit:5 %} {% for post in site.posts limit:5 %}
<article itemscope itemtype="http://schema.org/BlogPosting" itemprop="blogPost"> <article>
<h2 itemprop="headline"><a href="{{ site.url }}{{ post.url }}" rel="bookmark" title="{{ post.title }}">{{ post.title }}</a></h2> <h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<p itemprop="text">{% if post.description %}{{ post.description }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 120 }}{% endif %}</p> <p>{% if post.description %}{{ post.description }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 120 }}{% endif %}</p>
</article> </article>
{% endfor %} {% endfor %}
</div><!-- /#index --> </div><!-- /#index -->
+6 -6
View File
@@ -7,24 +7,24 @@
{% include _head.html %} {% include _head.html %}
</head> </head>
<body class="page" itemscope itemtype="http://schema.org/WebPage"> <body class="page">
{% include _browser-upgrade.html %} {% include _browser-upgrade.html %}
{% include _navigation.html %} {% include _navigation.html %}
{% if page.image.feature %}<div class="image-wrap"> {% if page.image.feature %}<div class="image-wrap">
<img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }} feature image" itemprop="primaryImageOfPage"> <img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }} feature image">
{% if page.image.credit %}<span class="image-credit">Photo Credit: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></span>{% endif %} {% if page.image.credit %}<span class="image-credit">Photo Credit: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></span>{% endif %}
</div><!-- /.image-wrap -->{% endif %} </div><!-- /.image-wrap -->{% endif %}
<div id="main" role="main" itemprop="mainContentOfPage"> <div id="main" role="main">
<div class="article-author-side"> <div class="article-author-side">
{% include _author-bio.html %} {% include _author-bio.html %}
</div> </div>
<article itemscope itemtype="http://schema.org/CreativeWork"> <article>
<h1 itemprop="name">{{ page.title }}</h1> <h1>{{ page.title }}</h1>
<div class="article-wrap" itemprop="text"> <div class="article-wrap">
{{ content }} {{ content }}
</div><!-- /.article-wrap --> </div><!-- /.article-wrap -->
</article> </article>
+6 -6
View File
@@ -7,7 +7,7 @@
{% include _head.html %} {% include _head.html %}
</head> </head>
<body class="articles" itemscope itemtype="http://schema.org/WebPage"> <body class="post-index">
{% include _browser-upgrade.html %} {% include _browser-upgrade.html %}
@@ -22,8 +22,8 @@
{% include _author-bio.html %} {% include _author-bio.html %}
</div> </div>
<div id="index" itemprop="mainContentOfPage" itemscope itemtype="http://schema.org/Blog"> <div id="index">
<h1 itemprop="name">{{ page.title }}</h1> <h1>{{ page.title }}</h1>
{% for post in site.posts %} {% for post in site.posts %}
{% unless post.next %} {% unless post.next %}
<h3>{{ post.date | date: '%Y' }}</h3> <h3>{{ post.date | date: '%Y' }}</h3>
@@ -34,9 +34,9 @@
<h3>{{ post.date | date: '%Y' }}</h3> <h3>{{ post.date | date: '%Y' }}</h3>
{% endif %} {% endif %}
{% endunless %} {% endunless %}
<article itemscope itemtype="http://schema.org/BlogPosting" itemprop="blogPost"> <article>
<h2 itemprop="headline"><a href="{{ site.url }}{{ post.url }}" rel="bookmark" title="{{ post.title }}">{{ post.title }}</a></h2> <h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<p itemprop="text">{% if post.description %}{{ post.description }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 120 }}{% endif %}</p> <p>{% if post.description %}{{ post.description }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 120 }}{% endif %}</p>
</article> </article>
{% endfor %} {% endfor %}
</div><!-- /#index --> </div><!-- /#index -->
+9 -9
View File
@@ -7,34 +7,34 @@
{% include _head.html %} {% include _head.html %}
</head> </head>
<body class="article" itemscope itemtype="http://schema.org/WebPage"> <body class="post">
{% include _browser-upgrade.html %} {% include _browser-upgrade.html %}
{% include _navigation.html %} {% include _navigation.html %}
{% if page.image.feature %}<div class="image-wrap"> {% if page.image.feature %}<div class="image-wrap">
<img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }} feature image" itemprop="primaryImageOfPage"> <img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }} feature image">
{% if page.image.credit %}<span class="image-credit">Photo Credit: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></span>{% endif %} {% if page.image.credit %}<span class="image-credit">Photo Credit: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></span>{% endif %}
</div><!-- /.image-wrap -->{% endif %} </div><!-- /.image-wrap -->{% endif %}
<div id="main" role="main" itemprop="mainContentOfPage" itemscope itemtype="http://schema.org/Blog"> <div id="main" role="main">
<div class="article-author-side"> <div class="article-author-side">
{% include _author-bio.html %} {% include _author-bio.html %}
</div> </div>
<article itemscope itemtype="http://schema.org/BlogPosting" itemprop="blogPost"> <article>
<div class="headline-wrap"> <div class="headline-wrap">
<h1 itemprop="name">{{ page.title }}</h1> <h1>{{ page.title }}</h1>
<h2>{{ page.tagline }}</h2> <h2>{{ page.tagline }}</h2>
</div><!--/ .headline-wrap --> </div><!--/ .headline-wrap -->
<div class="article-wrap" itemprop="text"> <div class="article-wrap">
{{ content }} {{ content }}
<hr /> <hr />
<footer role="contentinfo"> <footer role="contentinfo">
<div class="article-author-bottom"> <div class="article-author-bottom">
{% include _author-bio.html %} {% include _author-bio.html %}
</div> </div>
<p class="byline"><strong>{{ page.title }}</strong> was published on <time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%B %d, %Y" }}</time>{% if page.modified %} and last modified on <time datetime="{{ page.modified | date: "%Y-%m-%d" }}" itemprop="dateModified">{{ page.modified | date: "%B %d, %Y" }}</time>{% endif %} by <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name"><a href="{{ site.url }}/about" title="About {{ site.owner.name }}" itemprop="url">{{ site.owner.name }}</a></span></span>.</p> <p class="byline"><strong>{{ page.title }}</strong> was published on <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %d, %Y" }}</time>{% if page.modified %} and last modified on <time datetime="{{ page.modified | date: "%Y-%m-%d" }}">{{ page.modified | date: "%B %d, %Y" }}</time>{% endif %} by <a href="{{ site.url }}/about" title="About {{ site.owner.name }}">{{ site.owner.name }}</a>.</p>
</footer> </footer>
</div><!-- /.article-wrap --> </div><!-- /.article-wrap -->
</article> </article>
@@ -42,7 +42,7 @@
<div class="footer-wrap"> <div class="footer-wrap">
{% if site.related_posts.size > 0 %}<div class="related-articles"> {% if site.related_posts.size > 0 %}<div class="related-articles">
<h4>You might also enjoy <small class="pull-right">(<a href="{{ site.url }}/articles">View all articles</a>)</small></h4> <h4>You might also enjoy <small class="pull-right">(<a href="{{ site.url }}/posts/">View all posts</a>)</small></h4>
<ul> <ul>
{% for post in site.related_posts limit:3 %} {% for post in site.related_posts limit:3 %}
{% assign match = false %} {% assign match = false %}
@@ -66,4 +66,4 @@
{% include _scripts.html %} {% include _scripts.html %}
</body> </body>
</html> </html>
-1
View File
@@ -3,7 +3,6 @@ layout: post
title: Sample Post title: Sample Post
description: "Just about everything you'll need to style in the theme: headings, paragraphs, blockquotes, tables, code blocks, and more." description: "Just about everything you'll need to style in the theme: headings, paragraphs, blockquotes, tables, code blocks, and more."
modified: 2013-05-31 modified: 2013-05-31
category: articles
tags: [intro, beginner, jekyll, tutorial] tags: [intro, beginner, jekyll, tutorial]
image: image:
feature: texture-feature-05.jpg feature: texture-feature-05.jpg
-1
View File
@@ -3,7 +3,6 @@ layout: post
title: "Testing Readability with a Bunch of Text" title: "Testing Readability with a Bunch of Text"
tagline: "A bunch of hipster ipsum for ya head." tagline: "A bunch of hipster ipsum for ya head."
description: "A ton of text to test readability." description: "A ton of text to test readability."
category: articles
tags: [sample post, readability, test] tags: [sample post, readability, test]
--- ---
-1
View File
@@ -2,7 +2,6 @@
layout: post layout: post
title: "A Post with Images" title: "A Post with Images"
description: "Examples and code for displaying images in posts." description: "Examples and code for displaying images in posts."
category: articles
tags: [sample post, images, test] tags: [sample post, images, test]
--- ---
@@ -3,7 +3,6 @@ layout: post
title: "Post with Large Feature Image and Text" title: "Post with Large Feature Image and Text"
tagline: "A bunch of hipster ipsum for ya head." tagline: "A bunch of hipster ipsum for ya head."
description: "Custom written post descriptions are the way to go... if you're not lazy." description: "Custom written post descriptions are the way to go... if you're not lazy."
category: articles
tags: [sample post, readability, test] tags: [sample post, readability, test]
image: image:
feature: texture-feature-04.jpg feature: texture-feature-04.jpg
@@ -2,7 +2,6 @@
layout: post layout: post
title: Syntax Highlighting Post title: Syntax Highlighting Post
description: "Demo post displaying the various ways of highlighting code in Markdown." description: "Demo post displaying the various ways of highlighting code in Markdown."
category: articles
tags: [sample post, code, highlighting] tags: [sample post, code, highlighting]
--- ---
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
layout: page layout: page
permalink: /about/index.html permalink: /about/
title: About the Theme title: About the Theme
tagline: Minimal Mistakes, a Jekyll Theme tagline: Minimal Mistakes, a Jekyll Theme
tags: [about, Jekyll, theme, responsive] tags: [about, Jekyll, theme, responsive]
-7
View File
@@ -1,7 +0,0 @@
---
layout: post-index
permalink: /articles/
title: Articles
tagline: A List of Posts
tags: [blog, graphic design]
---
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
-7
View File
@@ -217,13 +217,6 @@ body {
display: block; display: block;
color: @white; color: @white;
border-bottom-width: 0; border-bottom-width: 0;
&:hover {
font-weight: 400;
:before {
content: "\00bb";
padding-right: 5px;
}
}
} }
ul { ul {
margin: 0; margin: 0;
+2 -2
View File
@@ -5,7 +5,7 @@ layout: none
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"> <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<title type="text">{{ site.title }}</title> <title type="text">{{ site.title }}</title>
<subtitle type="text">{{ site.tagline }}</subtitle> <subtitle type="text">{{ site.tagline }}</subtitle>
<generator uri="https://github.com/mojombo/jekyll">Jekyll</generator> <generator uri="https://github.com/jekyll/jekyll">Jekyll</generator>
<link rel="self" type="application/atom+xml" href="{{ site.url }}/feed.xml" /> <link rel="self" type="application/atom+xml" href="{{ site.url }}/feed.xml" />
<link rel="alternate" type="text/html" href="{{ site.url }}" /> <link rel="alternate" type="text/html" href="{{ site.url }}" />
<updated>{{ site.time | date_to_xmlschema }}</updated> <updated>{{ site.time | date_to_xmlschema }}</updated>
@@ -34,4 +34,4 @@ layout: none
&lt;p&gt;&lt;a href=&quot;{{ site.url }}{{ post.url }}&quot;&gt;{{ post.title }}&lt;/a&gt; was originally published by {{ site.owner.name }} at &lt;a href=&quot;{{ site.url }}&quot;&gt;{{ site.title }}&lt;/a&gt; on {{ post.date | date: "%B %d, %Y" }}.&lt;/p&gt;</content> &lt;p&gt;&lt;a href=&quot;{{ site.url }}{{ post.url }}&quot;&gt;{{ post.title }}&lt;/a&gt; was originally published by {{ site.owner.name }} at &lt;a href=&quot;{{ site.url }}&quot;&gt;{{ site.title }}&lt;/a&gt; on {{ post.date | date: "%B %d, %Y" }}.&lt;/p&gt;</content>
</entry> </entry>
{% endfor %} {% endfor %}
</feed> </feed>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

+7
View File
@@ -0,0 +1,7 @@
---
layout: post-index
permalink: /posts/
title: All Posts
tagline: A List of Posts
tags: [blog]
---
+49 -14
View File
@@ -1,6 +1,6 @@
--- ---
layout: page layout: page
permalink: /theme-setup/index.html permalink: /theme-setup/
title: Theme Setup title: Theme Setup
description: "Instructions on how to install and customize the Jekyll theme Minimal Mistakes." description: "Instructions on how to install and customize the Jekyll theme Minimal Mistakes."
tags: [Jekyll, theme, responsive] tags: [Jekyll, theme, responsive]
@@ -22,13 +22,23 @@ image:
General notes and suggestions for customizing Minimal Mistakes. General notes and suggestions for customizing Minimal Mistakes.
## Basic Setup ## Basic Setup for a new Jekyll site
1. [Install Jekyll](http://jekyllrb.com) if you haven't already. 1. [Install Bundler](http://bundler.io) `gem install bundler` and then install [Jekyll](http://jekyllrb.com) and all dependencies `bundle install`.
2. Fork the [Minimal Mistakes repo](http://github.com/mmistakes/minimal-mistakes/) 2. Fork the [Minimal Mistakes repo](http://github.com/mmistakes/minimal-mistakes/fork).
3. Make it your own and customize, customize, customize. 3. Clone the repo you just forked and rename it.
4. Edit `_config.yml` to personalize your site.
5. Check out the sample posts in `_posts` to see examples for pulling in large feature images, assigning categories and tags, and other YAML data.
6. Read the documentation below for further customization pointers and documentation.
<a markdown="0" href="http://github.com/mmistakes/minimal-mistakes" class="btn">Minimal Mistakes on GitHub</a> <div markdown="0"><a href="https://github.com/mmistakes/minimal-mistakes/archive/master.zip" class="btn">Download the Theme</a></div>
**Pro-tip:** Delete the `gh-pages` branch after cloning and start fresh by branching off `master`. There is a bunch of garbage in `gh-pages` used for the theme's demo site that I'm guessing you don't want on your site.
{: .notice}
---
## Folder Structure
{% highlight text %} {% highlight text %}
minimal-mistakes/ minimal-mistakes/
@@ -42,7 +52,7 @@ minimal-mistakes/
├── _layouts/ ├── _layouts/
| ├── home.html #homepage layout | ├── home.html #homepage layout
| ├── page.html #page layout | ├── page.html #page layout
| ├── post-index.html #post listing layout | ├── post-index.html #post index layout
| └── post.html #post layout | └── post.html #post layout
├── _posts/ ├── _posts/
├── assets/ ├── assets/
@@ -55,7 +65,7 @@ minimal-mistakes/
| └── less/ | └── less/
├── images/ # images for posts and pages ├── images/ # images for posts and pages
├── about.md # about page ├── about.md # about page
├── articles.md # lists all posts from latest to oldest ├── posts.md # lists all posts from latest to oldest
└── index.md # homepage. lists 5 most recent posts └── index.md # homepage. lists 5 most recent posts
{% endhighlight %} {% endhighlight %}
@@ -69,7 +79,7 @@ Most of the variables found here are used in the .html files found in `_includes
#### Owner/Author Information #### Owner/Author Information
Change your name, bio, and avatar photo (100x100 pixels or larger), Twitter url, email, and Google+ url. If you want to link to an external image on Gravatar or something similiar you'll need to edit the path in `_author-bio.html` since it assumes it is located in `\images`. Change your name, bio, and avatar photo (100x100 pixels or larger), Twitter url, email, and Google+ url. If you want to link to an external image on Gravatar or something similiar you'll need to edit the path in `_author-bio.html` since it assumes it is located in `/images`.
Including a link to your Google+ profile has the added benefit of displaying [Google Authorship](https://plus.google.com/authorship) in Google search results if you've went ahead and applied for it. Don't have a Google+ account? Just leave it blank. Including a link to your Google+ profile has the added benefit of displaying [Google Authorship](https://plus.google.com/authorship) in Google search results if you've went ahead and applied for it. Don't have a Google+ account? Just leave it blank.
@@ -85,11 +95,11 @@ Edit page/post titles and URLs to include in the site's navigation. For external
# sample top navigation links # sample top navigation links
links: links:
- title: About Page - title: About Page
url: /about url: /about/
- title: Articles - title: Posts
url: /articles url: /posts/
- title: Other Page - title: Other Page
url: /other-page url: /other-page/
- title: External Page - title: External Page
url: http://mademistakes.com url: http://mademistakes.com
external: true external: true
@@ -97,7 +107,19 @@ links:
### Adding Posts and Pages ### Adding Posts and Pages
There are two main content layouts: *post.html* (for posts) and *page.html* (for pages). Both have large **feature images** that span the full-width of the screen, and both are meant for text heavy blog posts (or articles). There are two main content layouts: *post.html* (for posts) and *page.html* (for pages). Both have large **feature images** that span the full-width of the screen, and both are meant for long form articles and blog posts.
There are two rake tasks that can be used to create a new post or page with all YAML Front Matter. Using either `rake new_post` or `rake new_page` will prompt you for a title and tags to classify them. Example below:
{% highlight bash %}
rake new_post
Enter a title for your post: My Awesome Post
Enter tags to classify your post (comma separated): web development, code
Creating new post: _posts/2014-02-10-my-awesome-post.md
{% endhighlight %}
There are a few configuration variables that can be changed in `Rakefile.rb`. By default posts and pages will be created in MarkDown using the `.md` extension.
#### Feature Images #### Feature Images
@@ -120,6 +142,19 @@ image:
creditlink: http://mademistakes.com #url to their site or licensing creditlink: http://mademistakes.com #url to their site or licensing
{% endhighlight %} {% endhighlight %}
#### Post Index Page
A [sample index page]({{ site.url }}/posts/) listing all posts grouped by the year they were published has been provided. The name can be customized to your liking by editing a few references. For example, to change **Posts** to **Writing** update the following:
* In `_config.yml` under `links:` rename the title and URL to the following:
{% highlight yaml %}
links:
- title: Writing
url: /writing/
{% endhighlight %}
* Rename `posts.md` to `writing.md` and update the YAML front matter to match the title and URL set in `_config.yml`
* Update the **View all posts** link in `post.html` layout found in `_layouts` to match title and URL set previously.
#### Thumbnails for OG and Twitter Cards #### Thumbnails for OG and Twitter Cards
Post and page thumbnails work the same way. These are used by [Open Graph](https://developers.facebook.com/docs/opengraph/) and [Twitter Cards](https://dev.twitter.com/docs/cards) meta tags found in *_head.html*. If you don't assign a thumbnail the default graphic *(default-thumb.png)* is used. I'd suggest changing this to something more meaningful --- your logo or avatar are good options. Post and page thumbnails work the same way. These are used by [Open Graph](https://developers.facebook.com/docs/opengraph/) and [Twitter Cards](https://dev.twitter.com/docs/cards) meta tags found in *_head.html*. If you don't assign a thumbnail the default graphic *(default-thumb.png)* is used. I'd suggest changing this to something more meaningful --- your logo or avatar are good options.