fix broken img & link paths in local

This commit is contained in:
timurgordon
2022-07-27 17:27:19 +02:00
parent cf3c05f7d0
commit 5c218d610a
3 changed files with 11 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
--- ---
title: "Farm" title: "Farm"
template: "section.html" template: "page.html"
insert_anchor_links: "left" insert_anchor_links: "left"
--- ---

File diff suppressed because one or more lines are too long

View File

@@ -9,6 +9,14 @@ Parameters:
- bgPath: if bgPath is passed, the row has a full width background - bgPath: if bgPath is passed, the row has a full width background
--> -->
{% if page %}
{% if "![" in body %}
{% set url_prefix = "](" ~ page.permalink %}
{% set body = body | replace(from="](", to=url_prefix) %}
{% set body = body | replace(from=url_prefix ~ "http", to="](http") %}
{% endif %}
{% endif %}
{% set columns = body | safe | markdown | split(pat="|||") %} {% set columns = body | safe | markdown | split(pat="|||") %}
{% set row_class = "relative pt-6 p-4 flex flex-col sm:grid sm:grid-cols-2 sm:gap-10 xl:flex xl:flex-row"%} {% set row_class = "relative pt-6 p-4 flex flex-col sm:grid sm:grid-cols-2 sm:gap-10 xl:flex xl:flex-row"%}
@@ -81,10 +89,8 @@ Parameters:
{% set row_class = row_class ~ "w-screen -mx-8 sm:-mx-12 md:-mx-16 lg:-mx-20" %} {% set row_class = row_class ~ "w-screen -mx-8 sm:-mx-12 md:-mx-16 lg:-mx-20" %}
{% endif %} {% endif %}
<div class="{{row_class}}" style="{{styles}}" id="{{row_id}}"> <div class="{{row_class}}" style="{{styles}}" id="{{row_id}}">
{% for column in columns%} {% for column in columns%}
<!-- Hides empty columns if displayed vertically in small screen --> <!-- Hides empty columns if displayed vertically in small screen -->