From 0d7fc0d63818833c2c6c226f53f9d82f2898e713 Mon Sep 17 00:00:00 2001 From: Nathan Bergey Date: Sun, 26 Sep 2021 15:23:15 -0400 Subject: [PATCH] Better slug in sidenote and header image option in post --- src/_includes/sidenote.liquid | 4 ++-- src/_layouts/post.liquid | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/_includes/sidenote.liquid b/src/_includes/sidenote.liquid index b22315a..ddda7df 100644 --- a/src/_includes/sidenote.liquid +++ b/src/_includes/sidenote.liquid @@ -1,3 +1,3 @@ -{% assign sn_slug = sidenote | strip | strip_html | slice: 0, 50 | downcase | replace: '.', '' |replace: ' ', '-' %}{% capture snid %}sn-{{ sn_slug}}{% endcapture %} +{% assign sn_slug = sidenote | strip | strip_html | strip_newlines | slice: 0, 50 | downcase | remove: '"' | remove: "'" | remove: ' ' | remove: '.' | remove: '-' | remove: '_' %}{% capture snid %}sn-{{ sn_slug}}{% endcapture %} -{{ sidenote }} \ No newline at end of file +{{ sidenote | strip_newlines }} \ No newline at end of file diff --git a/src/_layouts/post.liquid b/src/_layouts/post.liquid index 079e233..0401e39 100644 --- a/src/_layouts/post.liquid +++ b/src/_layouts/post.liquid @@ -29,6 +29,12 @@
+ {% if page.data.header_image %} +
+ +
+ {% endif %} + {{ page.content }}