Skip to content

Commit

Permalink
feat: add the meta* page parameters (#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Mar 22, 2024
1 parent 248ee25 commit 55e5150
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions layouts/partials/hb/modules/blog/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,23 @@
<div class="hb-blog-post position-relative{{ cond $toc ` toc` `` }}">
<div class="hb-blog-post-intro hb-module mb-2">
<h1 class="hb-blog-post-title text-break">{{ .Title }}</h1>
<div class="hb-blog-post-meta">
{{ partialCached "hb/modules/blog/post/meta/authors" . . }}
{{ partialCached "hb/modules/blog/post/meta/date" . . }}
{{ partialCached "hb/modules/blog/post/meta/reading-time" . . }}
{{ partialCached "hb/modules/blog/post/meta/taxonomies" . . }}
</div>
{{- $meta := default dict .Params.meta }}
{{- if ne $meta false }}
<div class="hb-blog-post-meta">
{{- if default true $meta.authors }}
{{ partialCached "hb/modules/blog/post/meta/authors" . . }}
{{- end }}
{{- if default true $meta.date }}
{{ partialCached "hb/modules/blog/post/meta/date" . . }}
{{- end }}
{{- if default true $meta.reading_time }}
{{ partialCached "hb/modules/blog/post/meta/reading-time" . . }}
{{- end }}
{{- if default true $meta.taxonomies }}
{{ partialCached "hb/modules/blog/post/meta/taxonomies" . . }}
{{- end }}
</div>
{{- end }}
{{- with .Description }}
<div class="hb-blog-post-desc lead mt-1">{{ . }}</div>
{{- end }}
Expand Down

0 comments on commit 55e5150

Please sign in to comment.