Skip to content

Commit 63863db

Browse files
committed
Update publications template to handle different article types
1 parent 378bb27 commit 63863db

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

site/publications.ejs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
:::{
2+
<% for (const item of items) { %>
3+
<% if (item.type === 'article') { %>
4+
:::{ .article-card }
5+
# [<%= item.title %>](<%= item.url %>)
6+
**Authors:** <%= item.authors.join(', ') %>
7+
8+
**Abstract:** <%= item.abstract %>
9+
10+
**Journal and Year:** <%= item.journal %>, <%= item.year %>
11+
<% if (item.pdf) { %>
12+
[PDF](<%= item.pdf %>) |
13+
<% } %>
14+
[Repository](<%= item.url %>)
15+
:::
16+
<% } else if (item.type === 'book') { %>
17+
:::{ .book-card }
18+
# [<%= item.title %>](<%= item.url %>)
19+
**Authors:** <%= item.authors.join(', ') %>
20+
21+
**Publisher and Year:** <%= item.publisher %>, <%= item.year %>
22+
<% if (item.pdf) { %>
23+
[PDF](<%= item.pdf %>) |
24+
<% } %>
25+
[Repository](<%= item.url %>)
26+
:::
27+
<% } else if (item.type === 'conference') { %>
28+
:::{ .conference-card }
29+
# [<%= item.title %>](<%= item.url %>)
30+
**Authors:** <%= item.authors.join(', ') %>
31+
32+
**Conference and Year:** <%= item.conference %>, <%= item.year %>
33+
<% if (item.pdf) { %>
34+
[PDF](<%= item.pdf %>) |
35+
<% } %>
36+
[Repository](<%= item.url %>)
37+
:::
38+
<% } %>
39+
<% } %>
40+
:::

0 commit comments

Comments
 (0)