fixed the code comment issue

reference
https://discourse.gohugo.io/t/how-to-add-comments-in-a-template/75/3
This commit is contained in:
Jason TIAN 2023-01-07 09:46:55 +08:00
parent e8ffb631fb
commit f398f60475
5 changed files with 9 additions and 9 deletions

View file

@ -1,4 +1,4 @@
<!-- this is the partial template used to display the online player with the audio of current page -->
{{/* this is the partial template used to display the online player with the audio of current page */}}
<h2>线上收听</h2>
<audio controls="">

View file

@ -1,8 +1,8 @@
<!-- this is the comments system
{{/* this is the comments system
reference:
- https://archive.ph/R6JsA
-->
*/}}
<h2>评论</h2>
<div id="cusdis_thread"

View file

@ -1,4 +1,4 @@
<!-- this is used to list the book rss list
{{/* this is used to list the book rss list
the official document and reference:
- https://gohugo.io/content-management/shortcodes/
@ -19,7 +19,7 @@ usage example:
output page example:
- https://shufang.org/book-rss.html
-->
*/}}
{{ $rows := .Inner | transform.Unmarshal }}

View file

@ -1,4 +1,4 @@
<!-- this is used to embed specified audio(with full url) with player
{{/* this is used to embed specified audio(with full url) with player
the official document and reference:
- https://gohugo.io/content-management/shortcodes/
@ -6,7 +6,7 @@ the official document and reference:
usage:
{{< embed-specified-audio-with-player https://ting-2022.shufang.org/10-years-trailer.mp3 >}}
-->
*/}}
<audio controls="">
<source src="{{ $.Page.Site.Params.statsPrefix }}{{ .Get 1 }}" type="audio/mpeg">

View file

@ -1,4 +1,4 @@
<!-- this is used to embed the current page audio(no need to specify) with player
{{/* this is used to embed the current page audio(no need to specify) with player
the official document and reference:
- https://gohugo.io/content-management/shortcodes/
@ -9,7 +9,7 @@ usage:
output example:
- https://shufang.org/10-years-trailer.html
-->
*/}}
<audio controls="">
<source src="{{ $.Page.Site.Params.statsPrefix }}{{- if or (not (isset $.Page.Params "external_mp3")) (ne $.Page.Params.external_mp3 "yes") -}}{{ $.Page.Site.Params.baseURL | string }}{{- end -}}{{ $.Page.Params.mp3 | string }}" type="audio/mpeg">