Skip to content

Commit 72de065

Browse files
Added news shortcode
1 parent ad780a8 commit 72de065

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

layouts/shortcodes/news.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<h2>News</h2>
2+
3+
{{ range $date, $news := .Site.Data.news }}
4+
<article>
5+
{{ $date := printf $date | time }}
6+
<time>{{ time.Format "January 2, 2006" $date }}</time>:
7+
{{ $news | markdownify }}
8+
</article>
9+
</ul>
10+
{{ end }}

0 commit comments

Comments
 (0)