Skip to content

Commit 0425c64

Browse files
using quarto listing for news carousel
1 parent c7eb5e6 commit 0425c64

File tree

4 files changed

+962
-1
lines changed

4 files changed

+962
-1
lines changed

_includes/news/_news-carousel.ejs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
```{=html}
2+
<% for (const item of items) { %>
3+
<a href="<%- item.path %>">
4+
<h5><%- item.title %></h5>
5+
<p><%- item['reading-time'] %> min</p>
6+
<% if (item.description) { %>
7+
<p><%- item.description %></p>
8+
<% } %>
9+
<span>
10+
<span><%- item.author %></span>
11+
<span><%- item.date %></span>
12+
</span>
13+
</a>
14+
<% } %>
15+
```

_includes/news/news.qmd

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
listing:
3+
- id: news-carousel
4+
contents:
5+
- "news/posts/*/index.qmd"
6+
template: _includes/news/_news-carousel.ejs
7+
sort: "date desc"
8+
---
9+
10+
### News
11+
12+
::: {#news-carousel}
13+
:::
14+
15+
[See all news &rarr;](news/)

index.qmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Turing is written entirely in Julia, and is interoperable with its powerful ecos
2828

2929
:::::
3030

31-
{{< include _includes/news.qmd >}}
31+
{{< include _includes/news/news.qmd >}}
3232

3333
### Learn more
3434

@@ -128,3 +128,6 @@ Placeholder text introducing the Bayesian Workflow diagram from the ACM special
128128
{{< include _includes//citation/cite.qmd >}}
129129

130130
</div>
131+
132+
133+

0 commit comments

Comments
 (0)