test grid & farm page link and img fixes on gh pages
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -9,16 +9,33 @@ Parameters:
|
||||
- bgPath: if bgPath is passed, the row has a full width background
|
||||
-->
|
||||
|
||||
<!-- This fixes link paths in prod -->
|
||||
{% if page %}
|
||||
{% if "%}
|
||||
{% set body = body | replace(from="](", to=url_prefix) %}
|
||||
{% set body = body | replace(from=url_prefix ~ "http", to="](http") %}
|
||||
{{test}}
|
||||
{% if "](" in body %}
|
||||
{% set body_arr = body | split(pat="](") %}
|
||||
{% set body = body_arr[0] %}
|
||||
{% for i in body_arr %}
|
||||
{% set prev_index = loop.index0 - 1 %}
|
||||
{% if not loop.first %}
|
||||
{% if "![" in body_arr[prev_index] %}
|
||||
{% set_global body = body ~ '](' ~ page.permalink ~ i %}
|
||||
{% else %}
|
||||
{% if i is not starting_with("http") %}
|
||||
{% set base_url = get_url(path="") %}
|
||||
{% set_global body = body ~ '](' ~ base_url ~ i %}
|
||||
{% else %}
|
||||
{% set_global body = body ~ '](' ~ i %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<!-- This fixes image paths in local -->
|
||||
|
||||
|
||||
|
||||
{% 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"%}
|
||||
|
||||
Reference in New Issue
Block a user