mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 12:13:19 +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 -}}
|
||||
|
||||
@@ -18,7 +18,7 @@ cascade:
|
||||
kind: page
|
||||
pager: true
|
||||
editable: true
|
||||
hide_date: false
|
||||
show_date: true
|
||||
show_date_updated: true
|
||||
reading_time: true
|
||||
commentable: true
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Uses
|
||||
date: 2023-10-24
|
||||
hide_date: true
|
||||
show_date: false
|
||||
reading_time: false
|
||||
---
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ cascade:
|
||||
kind: page
|
||||
pager: true
|
||||
editable: true
|
||||
hide_date: false
|
||||
show_date: true
|
||||
show_date_updated: true
|
||||
reading_time: true
|
||||
commentable: true
|
||||
|
||||
@@ -18,7 +18,7 @@ cascade:
|
||||
kind: page
|
||||
pager: true
|
||||
editable: true
|
||||
hide_date: false
|
||||
show_date: true
|
||||
show_date_updated: true
|
||||
reading_time: true
|
||||
commentable: true
|
||||
|
||||
Reference in new issue
Block a user