Replace HTML comments in markdown with the new comment shortcode

See https://github.com/gohugoio/hugo/issues/12997
This commit is contained in:
Bjørn Erik Pedersen 2024-11-04 09:30:10 +01:00
parent c673880b6b
commit b5f289165e
8 changed files with 18 additions and 12 deletions

View File

@ -128,6 +128,7 @@ If `true`, the page will not be rendered unless you pass the `--buildDrafts` fla
[`keywords`]: /methods/page/keywords/
[taxonomy]: /getting-started/glossary/#taxonomy
{{% comment %}}
<!-- Added in v0.123.0 but purposefully omitted from documentation. -->
<!--
kind
@ -139,6 +140,7 @@ kind
lang
: The language code for this page. This is usually derived from the module mount or filename.
-->
{{% /comment %}}
###### lastmod
@ -182,11 +184,13 @@ Alias to [lastmod](#lastmod).
[output formats]: /templates/output-formats/
{{% comment %}}
<!-- Added in v0.123.0 but purposefully omitted from documentation. -->
<!--
path
: The canonical page path.
-->
{{% /comment %}}
###### params

View File

@ -12,9 +12,10 @@ weight: 160
toc: true
aliases: [/content/summaries/,/content-management/content-summaries/]
---
{{% comment %}}
<!-- Do not remove the manual summary divider below. -->
<!-- If you do, you will break its first literal usage on this page. -->
{{% /comment %}}
<!--more-->
You can define a summary manually, in front matter, or automatically. A manual summary takes precedence over a front matter summary, and a front matter summary takes precedence over an automatic summary.

View File

@ -16,7 +16,7 @@ toc: true
{{< new-in 0.128.0 >}}
<!-- TODO remove this admonition when feature is stable. -->
{{% todo %}}remove this admonition when feature is stable.{{% /todo %}}
{{% note %}}
This is an experimental feature pending the release of TailwindCSS v4.0.

View File

@ -36,7 +36,7 @@ These are a subset of the [KaTeX options].
output
: (`string`). Determines the markup language of the output. One of `html`, `mathml`, or `htmlAndMathml`. Default is `mathml`.
<!-- Indent to prevent splitting the description list. -->
{{% comment %}}Indent to prevent splitting the description list.{{% / comment %}}
With `html` and `htmlAndMathml` you must include KaTeX CSS within the `head` element of your base template. For example:

View File

@ -13,8 +13,10 @@ action:
signatures: [PAGE.Summary]
---
<!-- Do not remove the manual summary divider below. -->
<!-- If you do, you will break its first literal usage on this page. -->
{{% comment %}}
Do not remove the manual summary divider below.
If you do, you will break its first literal usage on this page.
{{% /comment %}}
<!--more-->
You can define a [summary] manually, in front matter, or automatically. A manual summary takes precedence over a front matter summary, and a front matter summary takes precedence over an automatic summary.

View File

@ -9,12 +9,9 @@ action:
signatures: [SITE.Taxonomies]
---
<!-- TODO
{{% comment %}}
Show template example: GetTerms
-->
{{% /comment %}}
Conceptually, the `Taxonomies` method on a `Site` object returns a data structure such&nbsp;as:

View File

@ -53,7 +53,7 @@ To process an emoji shortcode from within a template, use the [`emojify`] functi
[`emojify`]: /functions/transform/emojify/
[`RenderString`]: /methods/page/renderstring/
<!--
{{% comment %}}
To generate the sections below:
git clone https://github.com/ikatyang/emoji-cheat-sheet
@ -66,7 +66,7 @@ Then...
1. Copy and paste from README.md
2. Search/replace (regex) "^###\s" with "## "
3. Search/replace "^####\s " with "### "
-->
{{% /comment %}}
## Table of Contents

View File

@ -0,0 +1,2 @@
{{- $nop := .Inner -}}
{{- /* "" */ -}}