From b8721c353e65644542b1ee7dec97b04d47c5f443 Mon Sep 17 00:00:00 2001 From: Meitar M Date: Fri, 31 Jan 2020 12:57:18 -0500 Subject: [PATCH] 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
- +