From ac3ef33869b698d770c5419d5d2b8c8e67f5c174 Mon Sep 17 00:00:00 2001 From: Zach Margolis Date: Mon, 7 Aug 2023 13:48:08 -0700 Subject: [PATCH 1/3] Remove extra "| render" to fix info rendering on Travel Guide --- _includes/alert.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/alert.html b/_includes/alert.html index adec2e034..5dfe28a9c 100644 --- a/_includes/alert.html +++ b/_includes/alert.html @@ -7,6 +7,6 @@
{% if heading %}

{{ heading | escape }}

{% endif %} - {% if content %}
{{ content | default: '' | render }}
{% endif %} + {% if content %}
{{ content | default: '' }}
{% endif %}
From 0237e3909ca6cbe16388bb86abc1b5eaa0e84938 Mon Sep 17 00:00:00 2001 From: Zach Margolis Date: Mon, 7 Aug 2023 13:51:06 -0700 Subject: [PATCH 2/3] Update local running instructions in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0fd025e03..52688bdee 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ To run the site locally: 3. From the repo directory, run: ```sh npm install - npm run dev + npm start ``` 4. Open http://localhost:8080 From bbac6d4ef61c28ce311805ddcf4f0c548cddae72 Mon Sep 17 00:00:00 2001 From: Greg Walker Date: Mon, 7 Aug 2023 16:25:24 -0500 Subject: [PATCH 3/3] preserve html in md render; don't pre-render travel alert --- _includes/alert.html | 2 +- config/filters/render.js | 2 +- pages/travel-and-leave/travel-guide-table-of-contents.md | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/_includes/alert.html b/_includes/alert.html index 5dfe28a9c..adec2e034 100644 --- a/_includes/alert.html +++ b/_includes/alert.html @@ -7,6 +7,6 @@
{% if heading %}

{{ heading | escape }}

{% endif %} - {% if content %}
{{ content | default: '' }}
{% endif %} + {% if content %}
{{ content | default: '' | render }}
{% endif %}
diff --git a/config/filters/render.js b/config/filters/render.js index 7fb346930..11ce56703 100644 --- a/config/filters/render.js +++ b/config/filters/render.js @@ -1,6 +1,6 @@ const MarkdownIt = require("markdown-it"); module.exports = async (content) => { - const md = new MarkdownIt(); + const md = new MarkdownIt({ html: true }); return md.render(content); }; diff --git a/pages/travel-and-leave/travel-guide-table-of-contents.md b/pages/travel-and-leave/travel-guide-table-of-contents.md index 3e427e870..81ab66686 100644 --- a/pages/travel-and-leave/travel-guide-table-of-contents.md +++ b/pages/travel-and-leave/travel-guide-table-of-contents.md @@ -13,9 +13,7 @@ sidebar: {% capture travel_content %} - {% renderTemplate 'liquid' %} - On July 13, 2021, GSA published updated travel guidance for all employees. - {% endrenderTemplate %} + On July 13, 2021, GSA published [updated travel guidance]({% page "/july-13-travel-guidance/" %}) for all employees. {% endcapture %} {% include "alert.html" level:"info" heading:"Updated Travel Guidance for GSA Employees (07/13/2021)" content:travel_content %}