From 3afac22fc12ede44a44429f9174cbb8024533d19 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sun, 2 Apr 2023 08:07:36 -0700 Subject: [PATCH] Refactor code shortcode --- content/en/about/license.md | 2 +- .../en/content-management/build-options.md | 4 +- content/en/content-management/sections.md | 2 +- content/en/content-management/toc.md | 4 +- content/en/content-management/urls.md | 2 +- content/en/contribute/documentation.md | 349 +++++------------- content/en/functions/after.md | 2 +- content/en/functions/apply.md | 6 +- content/en/functions/default.md | 6 +- content/en/functions/dict.md | 2 +- content/en/functions/param.md | 4 +- content/en/functions/safeURL.md | 6 +- content/en/functions/sort.md | 10 +- content/en/functions/urlize.md | 2 +- .../hosting-on-netlify.md | 6 +- content/en/templates/404.md | 2 +- content/en/templates/base.md | 6 +- content/en/templates/homepage.md | 2 +- content/en/templates/internal.md | 2 +- content/en/templates/introduction.md | 2 +- content/en/templates/lists/index.md | 8 +- content/en/templates/partials.md | 4 +- content/en/templates/robots.md | 2 +- content/en/templates/section-templates.md | 2 +- content/en/templates/shortcode-templates.md | 8 +- content/en/templates/single-page-templates.md | 2 +- content/en/templates/taxonomy-templates.md | 2 +- content/en/templates/views.md | 6 +- layouts/shortcodes/code.html | 61 +-- 29 files changed, 187 insertions(+), 329 deletions(-) diff --git a/content/en/about/license.md b/content/en/about/license.md index e7e3ddce1..0173836dc 100644 --- a/content/en/about/license.md +++ b/content/en/about/license.md @@ -144,7 +144,7 @@ _END OF TERMS AND CONDITIONS_ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets `[]` replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same “printed page” as the copyright notice for easier identification within third-party archives. -{{< code file="apache-notice.txt" download="apache-notice.txt" >}} +{{< code file="apache-notice.txt" >}} Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/content/en/content-management/build-options.md b/content/en/content-management/build-options.md index d5b594800..068959e2a 100644 --- a/content/en/content-management/build-options.md +++ b/content/en/content-management/build-options.md @@ -76,7 +76,7 @@ _build: render: false {{< /code-toggle >}} -{{< code file="layouts/index.html" copy="false" >}} +{{< code file="layouts/index.html" copy=false >}}
{{ with site.GetPage "who-we-are" }} {{ .Content }} @@ -100,7 +100,7 @@ cascade: list: true # default {{< /code-toggle >}} -{{< code file="layouts/_defaults/testimonials.html" copy="false" >}} +{{< code file="layouts/_defaults/testimonials.html" copy=false >}}
{{ range first 5 .Pages }}
diff --git a/content/en/content-management/sections.md b/content/en/content-management/sections.md index 8d0549117..10c87e6cb 100644 --- a/content/en/content-management/sections.md +++ b/content/en/content-management/sections.md @@ -59,7 +59,7 @@ If you need a specific template for a sub-section, you need to adjust either the With the available [section variables and methods](#section-page-variables-and-methods) you can build powerful navigation. One common example would be a partial to show Breadcrumb navigation: -{{< code file="layouts/partials/breadcrumb.html" download="breadcrumb.html" >}} +{{< code file="layouts/partials/breadcrumb.html" >}}