Skip to content

Commit a0ac8be

Browse files
authored
feat(params): add example property (#72)
feat(hugo/shortcode-params): add `example` property Closes #70, #71
1 parent b100768 commit a0ac8be

File tree

6 files changed

+22
-6
lines changed

6 files changed

+22
-6
lines changed

i18n/en.toml

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ other = "Context"
1010
[parameter_default]
1111
other = "Default"
1212

13+
[parameter_example]
14+
other = "Example"
15+
1316
[parameter_heading]
1417
other = "Parameters"
1518

i18n/vi.toml

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ other = "Context"
1010
[parameter_default]
1111
other = "Default"
1212

13+
[parameter_example]
14+
other = "Example"
15+
1316
[parameter_heading]
1417
other = "Parameters"
1518

i18n/zh-hans.toml

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ other = "上下文"
1010
[parameter_default]
1111
other = "默认值"
1212

13+
[parameter_example]
14+
other = "示例"
15+
1316
[parameter_heading]
1417
other = "参数"
1518

i18n/zh-hant.toml

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ other = "默認值"
1313
[parameter_heading]
1414
other = "參數"
1515

16+
[parameter_example]
17+
other = "示例"
18+
1619
[parameter_name]
1720
other = "名稱"
1821

layouts/shortcodes/hugo/shortcode-params.html

+5-3
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,25 @@
2222
{{- end }}
2323
{{- printf "%s %s\n" (strings.Repeat $paramHeadingLevel "#") $name }}
2424
{{- printf
25-
"| %s | %s | %s | %s | %s | %s |\n"
25+
"| %s | %s | %s | %s | %s | %s | %s |\n"
2626
(i18n "parameter_position")
2727
(i18n "parameter_name")
2828
(i18n "parameter_type")
2929
(i18n "parameter_required")
3030
(i18n "parameter_default")
3131
(i18n "parameter_since")
32+
(i18n "parameter_example")
3233
}}
33-
{{- printf "| --- | :-: | :-: | :-: | :-: | :-: |\n" }}
34+
{{- printf "| --- | :-: | :-: | :-: | :-: | :-: | :-: |\n" }}
3435
{{- printf
35-
"| %s | %s | %s | %s | %s | %s |\n"
36+
"| %s | %s | %s | %s | %s | %s | %s |\n"
3637
(cond (isset . "position") (printf "`#%d`" .position) "-")
3738
$name
3839
$type
3940
(cond (default false .required) "✓" "-")
4041
(cond (isset . "default") (printf "`%s`" (string .default)) "-")
4142
(cond (isset . "since") (printf "`%s`" (string .since)) "-")
43+
(cond (isset . "example") (printf "`%s`" (string .example)) "-")
4244
}}
4345
{{- printf "\n" }}
4446
{{- with .description }}

layouts/shortcodes/params.html

+5-3
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,25 @@
2525
{{- end }}
2626
{{- printf "%s %s\n" (strings.Repeat $paramHeadingLevel "#") $name }}
2727
{{- printf
28-
"| %s | %s | %s | %s | %s | %s |\n"
28+
"| %s | %s | %s | %s | %s | %s | %s |\n"
2929
(i18n "parameter_name")
3030
(i18n "parameter_context")
3131
(i18n "parameter_type")
3232
(i18n "parameter_required")
3333
(i18n "parameter_default")
3434
(i18n "parameter_since")
35+
(i18n "parameter_example")
3536
}}
36-
{{- printf "| --- | :-: | :-: | :-: | :-: | :-: |\n" }}
37+
{{- printf "| --- | :-: | :-: | :-: | :-: | :-: | :-: |\n" }}
3738
{{- printf
38-
"| %s | %s | %s | %s | %s | %s |\n"
39+
"| %s | %s | %s | %s | %s | %s | %s |\n"
3940
$name
4041
(cond (not $ctx) "-" $ctx | printf "`%s`")
4142
$type
4243
(cond (default false .required) "✓" "-")
4344
(cond (isset . "default") (printf "`%s`" (string .default)) "-")
4445
(cond (isset . "since") (printf "`%s`" (string .since)) "-")
46+
(cond (isset . "example") (printf "`%s`" (string .example)) "-")
4547
}}
4648
{{- printf "\n" }}
4749
{{- with .description }}

0 commit comments

Comments
 (0)