~xdavidwu/xdavidwu.link

35d8c699f314a69597a085098530eaba3002caaf — Michael Rose 10 years ago e9a7679 + c7f29a1
Merge branch 'hotfix/updates'
9 files changed, 58 insertions(+), 45 deletions(-)

M README.md
M _config.yml
M _layouts/home.html
M _layouts/page.html
M _layouts/post-index.html
M _layouts/post.html
M about.md
R articles.md => posts.md
M theme-setup.md
M README.md => README.md +2 -2
@@ 34,7 34,7 @@ General notes and suggestions for customizing Minimal Mistakes.
## Setup for an Existing Jekyll site

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:

``` yaml


@@ 71,7 71,7 @@ bing_verify:
# For external links add external: true
links:
  - title: Theme Setup
    url: /theme-setup
    url: /theme-setup/
  - title: External Link
    url: http://mademistakes.com
    external: true

M _config.yml => _config.yml +3 -3
@@ 32,8 32,8 @@ bing_verify:
links:
  - title: About
    url: /about/
  - title: Articles
    url: /articles/
  - title: Posts
    url: /posts/
  - title: Theme Setup
    url: /theme-setup/
  - title: Made Mistakes


@@ 47,7 47,7 @@ pygments:    true
markdown:    kramdown

# https://github.com/mojombo/jekyll/wiki/Permalinks
permalink:   /:categories/:title
permalink:   /:categories/:title/

kramdown:
  auto_ids: true

M _layouts/home.html => _layouts/home.html +6 -6
@@ 7,14 7,14 @@
{% include _head.html %}
</head>

<body class="home" itemscope itemtype="http://schema.org/WebPage">
<body class="home">

{% include _browser-upgrade.html %}

{% include _navigation.html %}

{% 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 %}
</div><!-- /.image-wrap -->{% endif %}



@@ 22,12 22,12 @@
  {% include _author-bio.html %}
</div>

<div id="index" itemprop="mainContentOfPage" itemscope itemtype="http://schema.org/Blog">
<div id="index">
  <h3><a href="{{ site.url}}/articles/">Articles</a></h3>
  {% for post in site.posts limit:5 %}    
  <article itemscope itemtype="http://schema.org/BlogPosting" itemprop="blogPost">
    <h2 itemprop="headline"><a href="{{ site.url }}{{ post.url }}" rel="bookmark" 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>
  <article>
    <h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
    <p>{% if post.description %}{{ post.description }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 120 }}{% endif %}</p>
  </article>
  {% endfor %}
</div><!-- /#index -->

M _layouts/page.html => _layouts/page.html +6 -6
@@ 7,24 7,24 @@
{% include _head.html %}
</head>

<body class="page" itemscope itemtype="http://schema.org/WebPage">
<body class="page">

{% include _browser-upgrade.html %}

{% include _navigation.html %}

{% 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 %}
</div><!-- /.image-wrap -->{% endif %}

<div id="main" role="main"  itemprop="mainContentOfPage">
<div id="main" role="main">
  <div class="article-author-side">
    {% include _author-bio.html %}
  </div>
  <article itemscope itemtype="http://schema.org/CreativeWork">
    <h1 itemprop="name">{{ page.title }}</h1>
    <div class="article-wrap" itemprop="text">
  <article>
    <h1>{{ page.title }}</h1>
    <div class="article-wrap">
      {{ content }}
    </div><!-- /.article-wrap -->
  </article>

M _layouts/post-index.html => _layouts/post-index.html +6 -6
@@ 7,7 7,7 @@
{% include _head.html %}
</head>

<body class="articles" itemscope itemtype="http://schema.org/WebPage">
<body class="post-index">

{% include _browser-upgrade.html %}



@@ 22,8 22,8 @@
  {% include _author-bio.html %}
</div>

<div id="index" itemprop="mainContentOfPage" itemscope itemtype="http://schema.org/Blog">
  <h1 itemprop="name">{{ page.title }}</h1>
<div id="index">
  <h1>{{ page.title }}</h1>
  {% for post in site.posts %}  
  {% unless post.next %}
    <h3>{{ post.date | date: '%Y' }}</h3>


@@ 34,9 34,9 @@
        <h3>{{ post.date | date: '%Y' }}</h3>
      {% endif %}
    {% endunless %}
    <article itemscope itemtype="http://schema.org/BlogPosting" itemprop="blogPost">
      <h2 itemprop="headline"><a href="{{ site.url }}{{ post.url }}" rel="bookmark" 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>
    <article>
      <h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
      <p>{% if post.description %}{{ post.description }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 120 }}{% endif %}</p>
    </article>
  {% endfor %}
</div><!-- /#index -->

M _layouts/post.html => _layouts/post.html +9 -9
@@ 7,34 7,34 @@
{% include _head.html %}
</head>

<body class="article" itemscope itemtype="http://schema.org/WebPage">
<body class="post">

{% include _browser-upgrade.html %}

{% include _navigation.html %}

{% 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 %}
</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">
    {% include _author-bio.html %}
  </div>
  <article itemscope itemtype="http://schema.org/BlogPosting" itemprop="blogPost">
  <article>
    <div class="headline-wrap">
      <h1 itemprop="name">{{ page.title }}</h1>
      <h1>{{ page.title }}</h1>
      <h2>{{ page.tagline }}</h2>
    </div><!--/ .headline-wrap -->
    <div class="article-wrap" itemprop="text">
    <div class="article-wrap">
      {{ content }}
      <hr />
      <footer role="contentinfo">
        <div class="article-author-bottom">
          {% include _author-bio.html %}
        </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>
    </div><!-- /.article-wrap -->
  </article>


@@ 42,7 42,7 @@

<div class="footer-wrap">
  {% 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>
    {% for post in site.related_posts limit:3 %}
      {% assign match = false %}


@@ 66,4 66,4 @@
{% include _scripts.html %}	        

</body>
</html>
</html>
\ No newline at end of file

M about.md => about.md +1 -1
@@ 1,6 1,6 @@
---
layout: page
permalink: /about/index.html
permalink: /about/
title: About the Theme
tagline: Minimal Mistakes, a Jekyll Theme
tags: [about, Jekyll, theme, responsive]

R articles.md => posts.md +3 -3
@@ 1,7 1,7 @@
---
layout: post-index
permalink: /articles/
title: Articles
permalink: /posts/
title: All Posts
tagline: A List of Posts
tags: [blog, graphic design]
tags: [blog]
---
\ No newline at end of file

M theme-setup.md => theme-setup.md +22 -9
@@ 1,6 1,6 @@
---
layout: page
permalink: /theme-setup/index.html
permalink: /theme-setup/
title: Theme Setup
description: "Instructions on how to install and customize the Jekyll theme Minimal Mistakes."
tags: [Jekyll, theme, responsive]


@@ 42,7 42,7 @@ minimal-mistakes/
├── _layouts/
|    ├── home.html  #homepage layout
|    ├── page.html  #page layout
|    ├── post-index.html  #post listing layout
|    ├── post-index.html  #post index layout
|    └── post.html  #post layout
├── _posts/
├── assets/


@@ 55,7 55,7 @@ minimal-mistakes/
|    └── less/
├── images/  # images for posts and pages
├── 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
{% endhighlight %}



@@ 69,7 69,7 @@ Most of the variables found here are used in the .html files found in `_includes

#### 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.



@@ 85,11 85,11 @@ Edit page/post titles and URLs to include in the site's navigation. For external
# sample top navigation links
links:
  - title: About Page
    url: /about
  - title: Articles
    url: /articles
    url: /about/
  - title: Posts
    url: /posts/
  - title: Other Page
    url: /other-page
    url: /other-page/
  - title: External Page
    url: http://mademistakes.com
    external: true


@@ 97,7 97,7 @@ links:

### 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. 

#### Feature Images



@@ 120,6 120,19 @@ image:
  creditlink: http://mademistakes.com #url to their site or licensing
{% 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

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.