diff --git a/docs/.eleventy.js b/docs/.eleventy.js index b9e27c8fd7b..56ce2de99f1 100644 --- a/docs/.eleventy.js +++ b/docs/.eleventy.js @@ -126,6 +126,8 @@ module.exports = function(eleventyConfig) { eleventyConfig.addNunjucksAsyncShortcode("link", async function(link) { const { body: html, url } = await got(link); const metadata = await metascraper({ html, url }); + + const encodedURL = encodeURIComponent(link); const the_url = (new URL(link)); // same as url const domain = the_url.hostname; diff --git a/docs/src/_includes/components/docs-toc.html b/docs/src/_includes/components/docs-toc.html index 20befc02d3e..94e9a6672fe 100644 --- a/docs/src/_includes/components/docs-toc.html +++ b/docs/src/_includes/components/docs-toc.html @@ -1,8 +1,8 @@ diff --git a/docs/src/_includes/layouts/doc.html b/docs/src/_includes/layouts/doc.html index b8fbd3b9847..b3f301f76ed 100644 --- a/docs/src/_includes/layouts/doc.html +++ b/docs/src/_includes/layouts/doc.html @@ -13,39 +13,12 @@ {% include 'components/docs-index.html' %} - {# Add in related rules and further reading sections to content so TOC is accurate #} - {% set all_content = content %} - {% if related_rules %} - {% set related_rules_content %} - - {% related_rules related_rules %} - {% endset %} - - {% set all_content = [all_content, related_rules_content] | join %} - {% endif %} - - {% if further_reading %} - {% set further_reading_content %} -

Further Reading

- {# async shortcodes don't work here so need to manually insert later #} - {% endset %} - - {% set all_content = [all_content, further_reading_content] | join %} - {% endif %} -

{{ title }}

{% include 'components/docs-toc.html' %} - {{ all_content | safe }} - - {# now insert the async-fetched link data if necessary #} - {% if further_reading %} - {% for url in further_reading %} - {% link url %} - {% endfor %} - {% endif %} + {{ content | safe }}