Skip to content

Commit fe4dde1

Browse files
chalintiffany76
andauthored
Blog 2025 section: offer wishes and hope of articles to come (#5885)
Co-authored-by: Tiffany Hrabusa <[email protected]>
1 parent b68e228 commit fe4dde1

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

content/en/blog/2025/_index.md

+4
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ title: 2025
33
weight: -2025
44
outputs: [HTML, RSS]
55
---
6+
7+
## Happy New Year!
8+
9+
Amazing posts are on their way for 2025 &mdash; check back soon.

layouts/blog/list.html

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{{ define "main" }}
2+
{{ if (and .Parent .Parent.IsHome) -}}
3+
{{ $.Scratch.Set "blog-pages" (where .Site.RegularPages "Section" .Section) -}}
4+
{{ else -}}
5+
{{$.Scratch.Set "blog-pages" .Pages -}}
6+
{{ end -}}
7+
8+
{{/* Docsy override - temporary */ -}}
9+
{{ .Content -}}
10+
11+
<div class="td-blog-posts">
12+
{{ if .Pages -}}
13+
{{ $pag := .Paginate (( $.Scratch.Get "blog-pages").GroupByDate "2006" ) -}}
14+
{{ range $pag.PageGroups -}}
15+
<div class="h2">{{ T "post_posts_in" }} {{ .Key }}</div>
16+
<ul class="td-blog-posts-list">
17+
{{ range .Pages -}}
18+
<li class="td-blog-posts-list__item">
19+
<div class="td-blog-posts-list__body">
20+
<h5 class="mt-0 mb-1"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h5>
21+
<p class="mb-2 mb-md-3"><small class="text-body-secondary">{{ .Date.Format ($.Param "time_format_blog") }} {{ T "ui_in"}} {{ .CurrentSection.LinkTitle }}</small></p>
22+
<header class="article-meta">
23+
{{ partial "taxonomy_terms_article_wrapper.html" . -}}
24+
{{ if (and (not .Params.hide_readingtime) (.Site.Params.ui.readingtime.enable)) -}}
25+
{{ partial "reading-time.html" . -}}
26+
{{ end -}}
27+
</header>
28+
{{ partial "featured-image.html" (dict "p" . "w" 250 "h" 125 "class" "float-start me-3 pt-1 d-none d-md-block") -}}
29+
<p class="pt-0 mt-0">{{ .Plain | safeHTML | truncate 250 }}</p>
30+
<p class="pt-0"><a href="{{ .RelPermalink }}" aria-label="{{ T "ui_read_more"}} - {{ .LinkTitle }}">{{ T "ui_read_more"}}</a></p>
31+
</div>
32+
</li>
33+
{{ end -}}
34+
</ul>
35+
{{ end -}}
36+
{{ end }}
37+
</div>
38+
<div class="td-blog-posts__pagination">
39+
{{ if .Pages -}}
40+
{{ template "_internal/pagination.html" . -}}
41+
{{ end -}}
42+
</div>
43+
{{ end -}}

0 commit comments

Comments
 (0)