From 033cfa2c44bf53d3939524c87671633c9ab158f6 Mon Sep 17 00:00:00 2001 From: Meitar M Date: Thu, 30 Jan 2020 18:59:02 -0500 Subject: [PATCH 1/4] Add page titles to `` element. --- _includes/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/head.html b/_includes/head.html index 1355dd7..e8c8135 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,5 +1,5 @@ <head> - <title>{{ site.title }} + {% if page.title %}{{ page.title }} | {% endif %}{{ site.title }} From b8721c353e65644542b1ee7dec97b04d47c5f443 Mon Sep 17 00:00:00 2001 From: Meitar M Date: Fri, 31 Jan 2020 12:57:18 -0500 Subject: [PATCH 2/4] Fix relative paths to images when a permalink is used. This commit uses the Jekyll `link` tag to correctly construct the URL to images with otherwise relative paths. Without this logic, the images would only load when the landing page's permalink was not altered by the user. For example, if the permalink is changed to `get-started` in the Jekyll Front Matter, the relative URLs would become: get-started/assets/images/pic08.jpg However, since the `get-started` path doesn't really exist, this would fail to load the image. As of Jekyll 4.0, the `link` tag is safe to use without prepending `site.baseurl`, so this code works in all situations. --- elements.md | 24 ++++++++++++------------ landing.md | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/elements.md b/elements.md index ac7d83a..cc5381e 100644 --- a/elements.md +++ b/elements.md @@ -361,26 +361,26 @@ Finally, this is a link.

Image

Fit

- +
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+

Left & Right

-

Lorem ipsum dolor sit accumsan interdum nisi, quis tincidunt felis sagittis eget. tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan eu faucibus. Integer ac pellentesque praesent tincidunt felis sagittis eget. tempus euismod. Vestibulum ante ipsum primis sagittis eget. tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan eu faucibus. Integer ac pellentesque praesent tincidunt felis sagittis eget tempus vestibulum ante ipsum primis in faucibus magna blandit adipiscing eu felis iaculis.

-

Lorem ipsum dolor sit accumsan interdum nisi, quis tincidunt felis sagittis eget. tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan eu faucibus. Integer ac pellentesque praesent tincidunt felis sagittis eget. tempus euismod. Vestibulum ante ipsum primis sagittis eget. tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan eu faucibus. Integer ac pellentesque praesent tincidunt felis sagittis eget tempus vestibulum ante ipsum primis in faucibus magna blandit adipiscing eu felis iaculis.

+

Lorem ipsum dolor sit accumsan interdum nisi, quis tincidunt felis sagittis eget. tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan eu faucibus. Integer ac pellentesque praesent tincidunt felis sagittis eget. tempus euismod. Vestibulum ante ipsum primis sagittis eget. tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan eu faucibus. Integer ac pellentesque praesent tincidunt felis sagittis eget tempus vestibulum ante ipsum primis in faucibus magna blandit adipiscing eu felis iaculis.

+

Lorem ipsum dolor sit accumsan interdum nisi, quis tincidunt felis sagittis eget. tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan eu faucibus. Integer ac pellentesque praesent tincidunt felis sagittis eget. tempus euismod. Vestibulum ante ipsum primis sagittis eget. tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan eu faucibus. Integer ac pellentesque praesent tincidunt felis sagittis eget tempus vestibulum ante ipsum primis in faucibus magna blandit adipiscing eu felis iaculis.

Box

diff --git a/landing.md b/landing.md index 0af45cf..c11b828 100644 --- a/landing.md +++ b/landing.md @@ -23,7 +23,7 @@ nav-menu: true
- +
@@ -39,7 +39,7 @@ nav-menu: true
- +
@@ -55,7 +55,7 @@ nav-menu: true
- +
From 8c70ecf0053a72d3cf30aab2fb07d45f209da43b Mon Sep 17 00:00:00 2001 From: Meitar M Date: Fri, 31 Jan 2020 13:27:27 -0500 Subject: [PATCH 3/4] Fix invalid HTML caused by doubly-nested `

` element. --- _layouts/post.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_layouts/post.html b/_layouts/post.html index a13d4e2..ef56284 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -23,7 +23,7 @@

{{ page.title }}

{% if page.image %}{% endif %} -

{{ content }}

+ {{ content }}
@@ -33,4 +33,4 @@ - \ No newline at end of file + From 4e4f981b8c86f5bb93acd8a6b15e35fcd593fea0 Mon Sep 17 00:00:00 2001 From: Meitar M Date: Fri, 31 Jan 2020 14:21:40 -0500 Subject: [PATCH 4/4] Fix bug where some pages where not shown as tiles. This commit refactors the `tiles.html` include file so that when the `site.tiles-source` is pages, pages with `show_tile: false` set in their Front Matter are not counted as having been shown. Prior to this commit, such pages were iterated over in the `for` loop, consuming a loop iteration from the `site.tiles-count` counter. Put another way, say you have set `tiles-count` to 6, and you have a total of 10 pages. Of these ten pages, six have `show_tile` set to `false`. The natural expectation would be that the home page layout would display four tiles (10 - 6 = 4), but in fact, the exact number of page tiles shown would depend on the specific lexicographical ordering of the `site.html_pages` array, which could result in fewer than four page tiles being shown. This commit fixes the issue by excluding pages with `show_tile` set to `false` first, and only then iterating over the remaining pages. --- _includes/tiles.html | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/_includes/tiles.html b/_includes/tiles.html index 39a8d7a..62892cd 100644 --- a/_includes/tiles.html +++ b/_includes/tiles.html @@ -1,28 +1,18 @@ +{% if 'posts' == site.tiles-source %} + {% assign tiles = site.posts %} +{% elsif 'pages' == site.tiles-source %} + {% assign tiles = site.html_pages | where_exp: "item", "item.show_tile != false" %} +{% endif %}
- {% for post in site.posts limit:site.tiles-count %} - {% if site.tiles-source == 'posts' %} + {% for tile in tiles limit:site.tiles-count %} - {% endif %} - {% endfor %} - {% for page in site.html_pages limit:site.tiles-count %} - {% if site.tiles-source == 'pages' and page.show_tile != false %} - - {% endif %} {% endfor %}