Remove deprecated base_path
include helper
This commit is contained in:
parent
2f40bb6403
commit
90f5a98406
9 changed files with 18 additions and 30 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
### Enhancements
|
||||||
|
|
||||||
|
- Remove deprecated `base_path` include helper.
|
||||||
|
|
||||||
## [4.13.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.13.0)
|
## [4.13.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.13.0)
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
{% if site.url %}
|
|
||||||
{% assign base_path = site.url | append: site.baseurl %}
|
|
||||||
{% else %}
|
|
||||||
{% assign base_path = site.github.url %}
|
|
||||||
{% endif %}
|
|
|
@ -20,7 +20,6 @@ minimal-mistakes
|
||||||
| ├── comments-providers # snippets for comments (Disqus, Facebook, Google+, and custom)
|
| ├── comments-providers # snippets for comments (Disqus, Facebook, Google+, and custom)
|
||||||
| ├── footer # custom snippets to add to site footer
|
| ├── footer # custom snippets to add to site footer
|
||||||
| ├── head # custom snippets to add to site head
|
| ├── head # custom snippets to add to site head
|
||||||
| ├── base_path # site.url + site.baseurl shortcut
|
|
||||||
| ├── feature_row # feature row helper
|
| ├── feature_row # feature row helper
|
||||||
| ├── gallery # image gallery helper
|
| ├── gallery # image gallery helper
|
||||||
| ├── group-by-array # group by array helper for archives
|
| ├── group-by-array # group by array helper for archives
|
||||||
|
|
|
@ -38,15 +38,6 @@ toc_icon: "cogs"
|
||||||
|
|
||||||
You can think of these Jekyll helpers as little shortcuts. Since GitHub Pages doesn't allow most plugins --- [custom tags](https://jekyllrb.com/docs/plugins/#tags) are out. Instead the theme leverages [**includes**](https://jekyllrb.com/docs/templates/#includes) to do something similar.
|
You can think of these Jekyll helpers as little shortcuts. Since GitHub Pages doesn't allow most plugins --- [custom tags](https://jekyllrb.com/docs/plugins/#tags) are out. Instead the theme leverages [**includes**](https://jekyllrb.com/docs/templates/#includes) to do something similar.
|
||||||
|
|
||||||
## Base Path
|
|
||||||
|
|
||||||
**Deprecated**. Use `relative_url` filter instead.
|
|
||||||
|
|
||||||
Instead of repeating `{% raw %}{{ site.url }}{{ site.baseurl }}{% endraw %}` over and over again to create absolute URLs, you can use `{% raw %}{{ base_path }}{% endraw %}` instead. Simply add `{% raw %}{% include base_path %}{% endraw %}` to layouts, posts, pages, collections, or other includes and you're good to go.
|
|
||||||
|
|
||||||
**ProTip:** It's a good practice to use absolute URL paths for assets (especially post images) so they correctly resolve in the site's XML feeds. Example: `{% raw %}{{ "/assets/images/filename.jpg" | relative_url }}{% endraw %}` ~> `https://yourdoamin.com/assets/images/filename.jpg`
|
|
||||||
{: .notice--info}
|
|
||||||
|
|
||||||
## Group by Array
|
## Group by Array
|
||||||
|
|
||||||
[Jekyll Group-By-Array](https://github.com/mushishi78/jekyll-group-by-array) by Max White.
|
[Jekyll Group-By-Array](https://github.com/mushishi78/jekyll-group-by-array) by Max White.
|
||||||
|
|
|
@ -4,10 +4,16 @@ permalink: /docs/history/
|
||||||
excerpt: "Change log of enhancements and bug fixes made to the theme."
|
excerpt: "Change log of enhancements and bug fixes made to the theme."
|
||||||
sidebar:
|
sidebar:
|
||||||
nav: docs
|
nav: docs
|
||||||
last_modified_at: 2018-09-10T19:36:45-04:00
|
last_modified_at: 2018-09-11T09:58:11-04:00
|
||||||
toc: true
|
toc: true
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
### Enhancements
|
||||||
|
|
||||||
|
- Remove deprecated `base_path` include helper.
|
||||||
|
|
||||||
## [4.13.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.13.0)
|
## [4.13.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.13.0)
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
|
|
|
@ -212,8 +212,3 @@ Still sticking with science and Albert Einstein's E = MC<sup>2</sup>, which shou
|
||||||
### Variable Tag
|
### Variable Tag
|
||||||
|
|
||||||
This allows you to denote <var>variables</var>.
|
This allows you to denote <var>variables</var>.
|
||||||
|
|
||||||
{% include base_path %}
|
|
||||||
{% for post in site.pages %}
|
|
||||||
{% include archive-single.html %}
|
|
||||||
{% endfor %}
|
|
|
@ -5,7 +5,7 @@ permalink: /sitemap/
|
||||||
author_profile: false
|
author_profile: false
|
||||||
---
|
---
|
||||||
|
|
||||||
A list of all the posts and pages found on the site. For you robots out there is an [XML version]({{ base_path }}/sitemap.xml) available for digesting as well.
|
A list of all the posts and pages found on the site. For you robots out there is an [XML version]({{ '/sitemap.xml' | relative_url }}) available for digesting as well.
|
||||||
|
|
||||||
<h2>Pages</h2>
|
<h2>Pages</h2>
|
||||||
{% for post in site.pages %}
|
{% for post in site.pages %}
|
||||||
|
|
|
@ -7,10 +7,8 @@ tags:
|
||||||
- Post Formats
|
- Post Formats
|
||||||
---
|
---
|
||||||
|
|
||||||
{% include base_path %}
|
|
||||||
|
|
||||||
{% capture fig_img %}
|
{% capture fig_img %}
|
||||||
![Foo]({{ basepath }}/assets/images/unsplash-gallery-image-3.jpg)
|
![Foo]({{ '/assets/images/unsplash-gallery-image-3.jpg' | relative_url }})
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
<figure>
|
<figure>
|
||||||
|
|
|
@ -18,8 +18,6 @@ tags:
|
||||||
last_modified_at: 2016-05-02T11:39:01-04:00
|
last_modified_at: 2016-05-02T11:39:01-04:00
|
||||||
---
|
---
|
||||||
|
|
||||||
{% include base_path %}
|
|
||||||
|
|
||||||
This post should display a **header with an overlay image**, if the theme supports it.
|
This post should display a **header with an overlay image**, if the theme supports it.
|
||||||
|
|
||||||
Non-square images can provide some unique styling issues.
|
Non-square images can provide some unique styling issues.
|
||||||
|
@ -30,7 +28,7 @@ This post tests overlay header images.
|
||||||
|
|
||||||
You can use it by specifying the opacity (between 0 and 1) of a black overlay like so:
|
You can use it by specifying the opacity (between 0 and 1) of a black overlay like so:
|
||||||
|
|
||||||
![transparent black overlay]({{ basepath }}/assets/images/mm-header-overlay-black-filter.jpg)
|
![transparent black overlay]({{ '/assets/images/mm-header-overlay-black-filter.jpg' | relative_url }})
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
excerpt: "This post should [...]"
|
excerpt: "This post should [...]"
|
||||||
|
@ -45,7 +43,7 @@ header:
|
||||||
|
|
||||||
Or if you want to do more fancy things, go full rgba:
|
Or if you want to do more fancy things, go full rgba:
|
||||||
|
|
||||||
![transparent red overlay]({{ basepath }}/assets/images/mm-header-overlay-red-filter.jpg)
|
![transparent red overlay]({{ '/assets/images/mm-header-overlay-red-filter.jpg' | relative_url }})
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
excerpt: "This post should [...]"
|
excerpt: "This post should [...]"
|
||||||
|
|
Loading…
Reference in a new issue