mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 04:14:41 +00:00
refactor(frontmatter): rename hide_date → show_date for consistent positive booleans
All other display toggles use positive naming (show_*, toc, share, etc.). Flipping to show_date (default: true) aligns the API and reduces cognitive load. BREAKING CHANGE
This commit is contained in:
1 parent
c8702b2c5e
commit
2bb78df692
6 files changed
+6
-6
No files matched your search
@@ -59,7 +59,7 @@
|
||||
{{ $display_date := .Params.event_start | default .Date }}
|
||||
<div class="mt-4 mb-16">
|
||||
<div class="text-gray-500 dark:text-gray-300 text-sm flex items-center flex-wrap gap-y-2">
|
||||
{{- if $display_date | and (not .Params.hide_date) -}}
|
||||
{{- if $display_date | and (.Params.show_date | default true) -}}
|
||||
<span class="mr-1">{{- (time $display_date) | time.Format (site.Params.hugoblox.locale.date_format | default ":date_long") -}}</span>
|
||||
{{- if .Params.authors }}<span class="mx-1">·</span>{{ end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
{{ $display_date := .Params.event_start | default .Date }}
|
||||
<div class="mt-4 mb-16">
|
||||
<div class="text-gray-500 dark:text-gray-300 text-sm flex items-center flex-wrap gap-y-2">
|
||||
{{- if $display_date | and (not .Params.hide_date) -}}
|
||||
{{- if $display_date | and (.Params.show_date | default true) -}}
|
||||
<span class="mr-1">{{- (time $display_date) | time.Format (site.Params.hugoblox.locale.date_format | default ":date_long") -}}</span>
|
||||
{{- if .Params.authors }}<span class="mx-1">·</span>{{ end -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in new issue
Block a user