Skip to content

Commit

Permalink
Shortcodes.
Browse files Browse the repository at this point in the history
  • Loading branch information
skyzyx committed Dec 4, 2024
1 parent 933ec50 commit 87b09fd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions layouts/shortcodes/param-class.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{- $type := (printf "%T" .Page.Params.class) -}}
{{- if eq $type "string" -}}
{{- .Page.Params.class -}}
{{- else -}}
{{- delimit .Page.Params.class ", " -}}
{{- end -}}
8 changes: 8 additions & 0 deletions layouts/shortcodes/param-year.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{- $type := (printf "%T" .Page.Params.year) -}}
{{- if eq $type "int" -}}
{{- .Page.Params.year -}}
{{- else if eq $type "string" -}}
{{- .Page.Params.year -}}
{{- else -}}
{{- delimit .Page.Params.year ", " -}}
{{- end -}}

0 comments on commit 87b09fd

Please sign in to comment.