Skip to content

Commit db3abe2

Browse files
committed
refactor: Remove the check on page type
Get page and data in a backward compatible way.
1 parent cae9c55 commit db3abe2

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

hugo-modules/core/utils/get-params.html

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@
1414
{{ $content_type := .content_type }}
1515
{{ $params := dict }}
1616

17-
{{ if (or (eq $content_type "page") (hasPrefix $content_type "t-")) }}
18-
{{ $page := partial "utils/get-page" . }}
19-
{{ with $page }}
20-
{{ $params = .Params }}
21-
{{ end }}
17+
{{ $page := partial "utils/get-page" . }}
18+
{{ with $page }}
19+
{{ $params = .Params }}
2220
{{ else }}
2321
{{ $params = merge . (partial "utils/get-data" . )}}
2422
{{ end }}
2523

26-
27-
2824
{{ return $params }}

0 commit comments

Comments
 (0)