~xdavidwu/xdavidwu.link

254b40b8a8fd45c1881e571ad7ece8ff3728fda4 — Michael Rose 7 years ago 58c43dc
Remove `prepend: "/"` from includes and add to image path's instead
M _includes/archive-single.html => _includes/archive-single.html +1 -1
@@ 18,7 18,7 @@
          {% if teaser contains "://" %}
            "{{ teaser }}"
          {% else %}
            "{{ teaser | prepend: "/" | absolute_url }}"
            "{{ teaser | absolute_url }}"
          {% endif %}
          alt="">
      </div>

M _includes/author-profile.html => _includes/author-profile.html +1 -1
@@ 9,7 9,7 @@
      {% if author.avatar contains "://" %}
      	<img src="{{ author.avatar }}" alt="{{ author.name }}">
      {% else %}
      	<img src="{{ author.avatar | prepend: "/" | absolute_url }}" class="author__avatar" alt="{{ author.name }}">
      	<img src="{{ author.avatar | absolute_url }}" class="author__avatar" alt="{{ author.name }}">
      {% endif %}
    </div>
  {% endif %}

M _includes/feature_row => _includes/feature_row +2 -2
@@ 11,7 11,7 @@
    {% if f.url contains "://" %}
      {% capture f_url %}{{ f.url }}{% endcapture %}
    {% else %}
      {% capture f_url %}{{ f.url | prepend: "/" | absolute_url }}{% endcapture %}
      {% capture f_url %}{{ f.url | absolute_url }}{% endcapture %}
    {% endif %}

    <div class="feature__item{% if include.type %}--{{ include.type }}{% endif %}">


@@ 22,7 22,7 @@
              {% if f.image_path contains "://" %}
                "{{ f.image_path }}"
              {% else %}
                "{{ f.image_path | prepend: "/" | absolute_url }}"
                "{{ f.image_path | absolute_url }}"
              {% endif %}
            alt="{% if f.alt %}{{ f.alt }}{% endif %}">
          </div>

M _includes/gallery => _includes/gallery +3 -3
@@ 19,7 19,7 @@
        {% if img.url contains "://" %}
          "{{ img.url }}"
        {% else %}
          "{{ img.url | prepend: "/" | absolute_url }}"
          "{{ img.url | absolute_url }}"
        {% endif %}
        {% if img.title %}title="{{ img.title }}"{% endif %}
      >


@@ 27,7 27,7 @@
          {% if img.image_path contains "://" %}
            "{{ img.image_path }}"
          {% else %}
            "{{ img.image_path | prepend: "/" | absolute_url }}"
            "{{ img.image_path | absolute_url }}"
          {% endif %}
          alt="{% if img.alt %}{{ img.alt }}{% endif %}">
      </a>


@@ 36,7 36,7 @@
        {% if img.image_path contains "://" %}
          "{{ img.image_path }}"
        {% else %}
          "{{ img.image_path | prepend: "/" | absolute_url }}"
          "{{ img.image_path | absolute_url }}"
        {% endif %}
        alt="{% if img.alt %}{{ img.alt }}{% endif %}">
    {% endif %}

M _includes/page__hero.html => _includes/page__hero.html +2 -2
@@ 1,7 1,7 @@
{% if page.header.image contains "://" %}
  {% capture img_path %}{{ page.header.image }}{% endcapture %}
{% else %}
  {% capture img_path %}{{ page.header.image | prepend: "/" | absolute_url }}{% endcapture %}
  {% capture img_path %}{{ page.header.image | absolute_url }}{% endcapture %}
{% endif %}

{% if page.header.cta_url contains "://" %}


@@ 13,7 13,7 @@
{% if page.header.overlay_image contains "://" %}
  {% capture overlay_img_path %}{{ page.header.overlay_image }}{% endcapture %}
{% elsif page.header.overlay_image %}
  {% capture overlay_img_path %}{{ page.header.overlay_image | prepend: "/" | absolute_url }}{% endcapture %}
  {% capture overlay_img_path %}{{ page.header.overlay_image | absolute_url }}{% endcapture %}
{% endif %}

{% if page.header.overlay_filter contains "rgba" %}

M _includes/seo.html => _includes/seo.html +8 -8
@@ 58,13 58,13 @@

  {% if page.header.image %}
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/" | absolute_url }}{% endif %}">
    <meta name="twitter:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | absolute_url }}{% endif %}">
  {% else %}
    <meta name="twitter:card" content="summary">
    {% if page.header.teaser %}
      <meta name="twitter:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | prepend: "/" | absolute_url }}{% endif %}">
      <meta name="twitter:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | absolute_url }}{% endif %}">
    {% elsif site.og_image %}
      <meta name="twitter:image" content="{{ site.og_image | prepend: "/" | absolute_url }}">
      <meta name="twitter:image" content="{{ site.og_image | absolute_url }}">
    {% endif %}
  {% endif %}



@@ 84,13 84,13 @@
{% endif %}

{% if page.header.image %}
  <meta property="og:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/" | absolute_url }}{% endif %}">
  <meta property="og:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | absolute_url }}{% endif %}">
{% elsif page.header.overlay_image %}
  <meta property="og:image" content="{% if page.header.overlay_image contains "://" %}{{ page.header.overlay_image }}{% else %}{{ page.header.overlay_image | prepend: "/" | absolute_url }}{% endif %}">
  <meta property="og:image" content="{% if page.header.overlay_image contains "://" %}{{ page.header.overlay_image }}{% else %}{{ page.header.overlay_image | absolute_url }}{% endif %}">
{% elsif page.header.teaser %}
  <meta property="og:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | prepend: "/" | absolute_url }}{% endif %}">
  <meta property="og:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | absolute_url }}{% endif %}">
{% elsif site.og_image %}
  <meta property="og:image" content="{% if site.og_image contains "://" %}{{ site.og_image }}{% else %}{{ site.og_image | prepend: "/" | absolute_url }}{% endif %}">
  <meta property="og:image" content="{% if site.og_image contains "://" %}{{ site.og_image }}{% else %}{{ site.og_image | absolute_url }}{% endif %}">
{% endif %}

{% if page.date %}


@@ 111,7 111,7 @@
      "@context": "http://schema.org",
      "@type": "Organization",
      "url": {{ seo_url | jsonify }},
      "logo": {{ site.og_image | prepend: "/" | absolute_url | jsonify }}
      "logo": {{ site.og_image | absolute_url | jsonify }}
    }
  </script>
{% endif %}

M _includes/sidebar.html => _includes/sidebar.html +1 -1
@@ 8,7 8,7 @@
        {% if s.image contains "://" %}
          "{{ s.image }}"
        {% else %}
          "{{ s.image | prepend: "/" | absolute_url }}"
          "{{ s.image | absolute_url }}"
        {% endif %}
        alt="{% if s.image_alt %}{{ s.image_alt }}{% endif %}">
      {% endif %}

M example/_config.yml => example/_config.yml +2 -2
@@ 16,7 16,7 @@ description              : "An amazing website."
url                      : # the base hostname & protocol for your site e.g. "https://mmistakes.github.io"
baseurl                  : # the subpath of your site, e.g. "/blog"
repository               : # GitHub username/repo-name e.g. "mmistakes/minimal-mistakes"
teaser                   : # filename of teaser fallback teaser image placed in /images/, .e.g. "500x300.png"
teaser                   : # path of fallback teaser image, e.g. "/assets/images/500x300.png"
# breadcrumbs            : false # true, false (default)
words_per_minute         : 200
comments:


@@ 80,7 80,7 @@ analytics:
# Site Author
author:
  name             : "Your Name"
  avatar           : "assets/images/bio-photo.jpg"
  avatar           : "/assets/images/bio-photo.jpg"
  bio              : "I am an amazing person."
  location         : "Somewhere"
  email            :

M example/_data/authors.yml => example/_data/authors.yml +2 -2
@@ 5,7 5,7 @@ Billy Rick:
  uri         : "http://thewhip.com"
  email       : "billy@rick.com"
  bio         : "What do you want, jewels? I am a very extravagant man."
  avatar      : "bio-photo-2.jpg"
  avatar      : "/assets/images/bio-photo-2.jpg"
  twitter     : "extravagantman"
  google_plus : "BillyRick"



@@ 13,6 13,6 @@ Cornelius Fiddlebone:
  name        : "Cornelius Fiddlebone"
  email       : "cornelius@thewhip.com"
  bio         : "I ordered what?"
  avatar      : "bio-photo.jpg"
  avatar      : "/assets/images/bio-photo.jpg"
  twitter     : "rhymeswithsackit"
  google_plus : "CorneliusFiddlebone"
\ No newline at end of file

M example/_pages/splash-page.md => example/_pages/splash-page.md +6 -6
@@ 6,7 6,7 @@ date: 2016-03-23T11:48:41-04:00
header:
  overlay_color: "#000"
  overlay_filter: "0.5"
  overlay_image: assets/images/unsplash-image-1.jpg
  overlay_image: /assets/images/unsplash-image-1.jpg
  cta_label: "Download"
  cta_url: "https://github.com/mmistakes/minimal-mistakes/"
  caption: "Photo credit: [**Unsplash**](https://unsplash.com)"


@@ 18,18 18,18 @@ feature_row:
    alt: "placeholder image 1"
    title: "Placeholder 1"
    excerpt: "This is some sample content that goes here with **Markdown** formatting."
  - image_path: assets/images/unsplash-gallery-image-2-th.jpg
  - image_path: /assets/images/unsplash-gallery-image-2-th.jpg
    alt: "placeholder image 2"
    title: "Placeholder 2"
    excerpt: "This is some sample content that goes here with **Markdown** formatting."
    url: "#test-link"
    btn_label: "Read More"
    btn_class: "btn--inverse"
  - image_path: assets/images/unsplash-gallery-image-3-th.jpg
  - image_path: /assets/images/unsplash-gallery-image-3-th.jpg
    title: "Placeholder 3"
    excerpt: "This is some sample content that goes here with **Markdown** formatting."
feature_row2:
  - image_path: assets/images/unsplash-gallery-image-2-th.jpg
  - image_path: /assets/images/unsplash-gallery-image-2-th.jpg
    alt: "placeholder image 2"
    title: "Placeholder Image Left Aligned"
    excerpt: 'This is some sample content that goes here with **Markdown** formatting. Left aligned with `type="left"`'


@@ 37,7 37,7 @@ feature_row2:
    btn_label: "Read More"
    btn_class: "btn--inverse"
feature_row3:
  - image_path: assets/images/unsplash-gallery-image-2-th.jpg
  - image_path: /assets/images/unsplash-gallery-image-2-th.jpg
    alt: "placeholder image 2"
    title: "Placeholder Image Right Aligned"
    excerpt: 'This is some sample content that goes here with **Markdown** formatting. Right aligned with `type="right"`'


@@ 45,7 45,7 @@ feature_row3:
    btn_label: "Read More"
    btn_class: "btn--inverse"
feature_row4:
  - image_path: assets/images/unsplash-gallery-image-2-th.jpg
  - image_path: /assets/images/unsplash-gallery-image-2-th.jpg
    alt: "placeholder image 2"
    title: "Placeholder Image Center Aligned"
    excerpt: 'This is some sample content that goes here with **Markdown** formatting. Centered with `type="center"`'

M example/_portfolio/foo-bar-website.md => example/_portfolio/foo-bar-website.md +5 -5
@@ 2,8 2,8 @@
title: "Foo Bar Identity"
excerpt: "Foo Bar design system including logo mark, website design, and branding applications."
header:
  image: assets/images/foo-bar-identity.jpg
  teaser: assets/images/foo-bar-identity-th.jpg
  image: /assets/images/foo-bar-identity.jpg
  teaser: /assets/images/foo-bar-identity-th.jpg
sidebar:
  - title: "Role"
    image: http://placehold.it/350x250


@@ 12,13 12,13 @@ sidebar:
  - title: "Responsibilities"
    text: "Reuters try PR stupid commenters should isn't a business model"
gallery:
  - url: assets/images/unsplash-gallery-image-1.jpg
  - url: /assets/images/unsplash-gallery-image-1.jpg
    image_path: assets/images/unsplash-gallery-image-1-th.jpg
    alt: "placeholder image 1"
  - url: assets/images/unsplash-gallery-image-2.jpg
  - url: /assets/images/unsplash-gallery-image-2.jpg
    image_path: assets/images/unsplash-gallery-image-2-th.jpg
    alt: "placeholder image 2"
  - url: assets/images/unsplash-gallery-image-3.jpg
  - url: /assets/images/unsplash-gallery-image-3.jpg
    image_path: assets/images/unsplash-gallery-image-3-th.jpg
    alt: "placeholder image 3"
---

M example/_posts/2010-08-05-post-image-standard.md => example/_posts/2010-08-05-post-image-standard.md +1 -1
@@ 7,7 7,7 @@ tags:
  - Post Formats
---

The preferred way of using images is placing them in the `assets/images/` directory and referencing them with an absolute path. Prepending the filename with `{% raw %}{{ site.url }}{{ site.baseurl }}/assets/images/{% endraw %}` will make sure your images display properly in feeds and such.
The preferred way of using images is placing them in the `/assets/images/` directory and referencing them with an absolute path. Prepending the filename with `{% raw %}{{ site.url }}{{ site.baseurl }}/assets/images/{% endraw %}` will make sure your images display properly in feeds and such.

Standard image with no width modifier classes applied.


M example/_posts/2010-09-09-post-gallery.md => example/_posts/2010-09-09-post-gallery.md +34 -34
@@ 7,52 7,52 @@ tags:
  - Post Formats
  - tiled
gallery:
  - url: assets/images/unsplash-gallery-image-1.jpg
    image_path: assets/images/unsplash-gallery-image-1-th.jpg
  - url: /assets/images/unsplash-gallery-image-1.jpg
    image_path: /assets/images/unsplash-gallery-image-1-th.jpg
    alt: "placeholder image 1"
    title: "Image 1 title caption"
  - url: assets/images/unsplash-gallery-image-2.jpg
    image_path: assets/images/unsplash-gallery-image-2-th.jpg
  - url: /assets/images/unsplash-gallery-image-2.jpg
    image_path: /assets/images/unsplash-gallery-image-2-th.jpg
    alt: "placeholder image 2"
    title: "Image 2 title caption"
  - url: assets/images/unsplash-gallery-image-3.jpg
    image_path: assets/images/unsplash-gallery-image-3-th.jpg
  - url: /assets/images/unsplash-gallery-image-3.jpg
    image_path: /assets/images/unsplash-gallery-image-3-th.jpg
    alt: "placeholder image 3"
    title: "Image 3 title caption"
  - url: assets/images/unsplash-gallery-image-1.jpg
    image_path: assets/images/unsplash-gallery-image-1-th.jpg
  - url: /assets/images/unsplash-gallery-image-1.jpg
    image_path: /assets/images/unsplash-gallery-image-1-th.jpg
    alt: "placeholder image 4"
    title: "Image 4 title caption"
  - url: assets/images/unsplash-gallery-image-2.jpg
    image_path: assets/images/unsplash-gallery-image-2-th.jpg
  - url: /assets/images/unsplash-gallery-image-2.jpg
    image_path: /assets/images/unsplash-gallery-image-2-th.jpg
    alt: "placeholder image 5"
    title: "Image 5 title caption"
  - url: assets/images/unsplash-gallery-image-3.jpg
    image_path: assets/images/unsplash-gallery-image-3-th.jpg
  - url: /assets/images/unsplash-gallery-image-3.jpg
    image_path: /assets/images/unsplash-gallery-image-3-th.jpg
    alt: "placeholder image 6"
    title: "Image 6 title caption"
  - url: assets/images/unsplash-gallery-image-1.jpg
    image_path: assets/images/unsplash-gallery-image-1-th.jpg
  - url: /assets/images/unsplash-gallery-image-1.jpg
    image_path: /assets/images/unsplash-gallery-image-1-th.jpg
    alt: "placeholder image 7"
    title: "Image 7 title caption"
  - url: assets/images/unsplash-gallery-image-2.jpg
    image_path: assets/images/unsplash-gallery-image-2-th.jpg
  - url: /assets/images/unsplash-gallery-image-2.jpg
    image_path: /assets/images/unsplash-gallery-image-2-th.jpg
    alt: "placeholder image 8"
    title: "Image 8 title caption"
  - url: assets/images/unsplash-gallery-image-3.jpg
    image_path: assets/images/unsplash-gallery-image-3-th.jpg
  - url: /assets/images/unsplash-gallery-image-3.jpg
    image_path: /assets/images/unsplash-gallery-image-3-th.jpg
    alt: "placeholder image 9"
    title: "Image 9 title caption"
  - url: assets/images/unsplash-gallery-image-1.jpg
    image_path: assets/images/unsplash-gallery-image-1-th.jpg
  - url: /assets/images/unsplash-gallery-image-1.jpg
    image_path: /assets/images/unsplash-gallery-image-1-th.jpg
    alt: "placeholder image 10"
    title: "Image 10 title caption"
  - url: assets/images/unsplash-gallery-image-2.jpg
    image_path: assets/images/unsplash-gallery-image-2-th.jpg
  - url: /assets/images/unsplash-gallery-image-2.jpg
    image_path: /assets/images/unsplash-gallery-image-2-th.jpg
    alt: "placeholder image 11"
    title: "Image 11 title caption"
  - url: assets/images/unsplash-gallery-image-3.jpg
    image_path: assets/images/unsplash-gallery-image-3-th.jpg
  - url: /assets/images/unsplash-gallery-image-3.jpg
    image_path: /assets/images/unsplash-gallery-image-3-th.jpg
    alt: "placeholder image 12"
    title: "Image 12 title caption"
gallery2:


@@ 66,9 66,9 @@ gallery2:
    image_path: https://farm5.staticflickr.com/4046/4697502929_72c612c636_q.jpg
    alt: "Fog in the trees"
gallery3:
  - image_path: assets/images/unsplash-gallery-image-2-th.jpg
  - image_path: /assets/images/unsplash-gallery-image-2-th.jpg
    alt: "placeholder image 2"
  - image_path: assets/images/unsplash-gallery-image-4-th.jpg
  - image_path: /assets/images/unsplash-gallery-image-4-th.jpg
    alt: "placeholder image 4"
---



@@ 78,20 78,20 @@ To place a gallery add the necessary YAML Front Matter:

```yaml
gallery:
  - url: assets/images/unsplash-gallery-image-1.jpg
    image_path: assets/images/unsplash-gallery-image-1-th.jpg
  - url: /assets/images/unsplash-gallery-image-1.jpg
    image_path: /assets/images/unsplash-gallery-image-1-th.jpg
    alt: "placeholder image 1"
    title: "Image 1 title caption"
  - url: assets/images/unsplash-gallery-image-2.jpg
    image_path: assets/images/unsplash-gallery-image-2-th.jpg
  - url: /assets/images/unsplash-gallery-image-2.jpg
    image_path: /assets/images/unsplash-gallery-image-2-th.jpg
    alt: "placeholder image 2"
    title: "Image 2 title caption"
  - url: assets/images/unsplash-gallery-image-3.jpg
    image_path: assets/images/unsplash-gallery-image-3-th.jpg
  - url: /assets/images/unsplash-gallery-image-3.jpg
    image_path: /assets/images/unsplash-gallery-image-3-th.jpg
    alt: "placeholder image 3"
    title: "Image 3 title caption"
  - url: assets/images/unsplash-gallery-image-4.jpg
    image_path: assets/images/unsplash-gallery-image-4-th.jpg
  - url: /assets/images/unsplash-gallery-image-4.jpg
    image_path: /assets/images/unsplash-gallery-image-4-th.jpg
    alt: "placeholder image 4"
    title: "Image 4 title caption"
```

M example/_posts/2012-03-15-layout-author-override.md => example/_posts/2012-03-15-layout-author-override.md +2 -2
@@ 18,14 18,14 @@ Billy Rick:
  uri: "http://thewhip.com"
  email: "billy@rick.com"
  bio: "What do you want, jewels? I am a very extravagant man."
  avatar: "assets/images/bio-photo-2.jpg"
  avatar: "/assets/images/bio-photo-2.jpg"
  twitter: "extravagantman"

Cornelius Fiddlebone:
  name: "Cornelius Fiddlebone"
  email: "cornelius@thewhip.com"
  bio: "I ordered what?"
  avatar: "assets/images/bio-photo.jpg"
  avatar: "/assets/images/bio-photo.jpg"
  twitter: "rhymeswithsackit"
```


M example/_posts/2012-03-15-layout-header-image-horizontal.md => example/_posts/2012-03-15-layout-header-image-horizontal.md +1 -1
@@ 1,7 1,7 @@
---
title: "Layout: Header Image (Horizontal)"
header:
  image: assets/images/unsplash-image-1.jpg
  image: /assets/images/unsplash-image-1.jpg
  caption: "Photo credit: [**Unsplash**](https://unsplash.com)"
categories:
  - Layout

M example/_posts/2012-03-15-layout-header-image-text-readability.md => example/_posts/2012-03-15-layout-header-image-text-readability.md +1 -1
@@ 1,7 1,7 @@
---
title: "Layout: Header Image and Text Readability"
header:
  image: assets/images/unsplash-image-4.jpg
  image: /assets/images/unsplash-image-4.jpg
  caption: "Photo credit: [**Unsplash**](https://unsplash.com)"
tags: 
  - sample post

M example/_posts/2012-03-15-layout-header-image-vertical.md => example/_posts/2012-03-15-layout-header-image-vertical.md +1 -1
@@ 1,7 1,7 @@
---
title: "Layout: Header Image (Vertical)"
header:
  image: assets/images/unsplash-image-6.jpg
  image: /assets/images/unsplash-image-6.jpg
  caption: "Photo credit: [**Unsplash**](https://unsplash.com)"
categories:
  - Layout

M example/_posts/2012-03-15-layout-header-overlay-image.md => example/_posts/2012-03-15-layout-header-overlay-image.md +3 -3
@@ 1,7 1,7 @@
---
title: "Layout: Header Image Overlay"
header:
  overlay_image: assets/images/unsplash-image-1.jpg
  overlay_image: /assets/images/unsplash-image-1.jpg
  caption: "Photo credit: [**Unsplash**](https://unsplash.com)"
  cta_url: "https://unsplash.com"
categories:


@@ 31,7 31,7 @@ You can use it by specifying the opacity (between 0 and 1) of a black overlay li
```yaml
excerpt: "This post should [...]"
header:
  overlay_image: assets/images/unsplash-image-1.jpg
  overlay_image: /assets/images/unsplash-image-1.jpg
  overlay_filter: 0.5 # same as adding an opacity of 0.5 to a black background
  caption: "Photo credit: [**Unsplash**](https://unsplash.com)"
  cta_label: "More Info"


@@ 45,7 45,7 @@ Or if you want to do more fancy things, go full rgba:
```yaml
excerpt: "This post should [...]"
header:
  overlay_image: assets/images/unsplash-image-1.jpg
  overlay_image: /assets/images/unsplash-image-1.jpg
  overlay_filter: rgba(255, 0, 0, 0.5)
  caption: "Photo credit: [**Unsplash**](https://unsplash.com)"
  cta_label: "More Info"

M example/_posts/2013-05-22-markup-more-images.md => example/_posts/2013-05-22-markup-more-images.md +2 -2
@@ 28,8 28,8 @@ Apply the `half` class like so to display two images side by side that share the

```html
<figure class="half">
    <a href="assets/images/image-filename-1-large.jpg"><img src="assets/images/image-filename-1.jpg"></a>
    <a href="assets/images/image-filename-2-large.jpg"><img src="assets/images/image-filename-2.jpg"></a>
    <a href="/assets/images/image-filename-1-large.jpg"><img src="/assets/images/image-filename-1.jpg"></a>
    <a href="/assets/images/image-filename-2-large.jpg"><img src="/assets/images/image-filename-2.jpg"></a>
    <figcaption>Caption describing these two images.</figcaption>
</figure>
```