Skip to content

Commit 0b2779c

Browse files
committed
Support for displaying slides on publication pages
1 parent c553fdb commit 0b2779c

10 files changed

+96
-41
lines changed

_includes/archive-single.html

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ <h2 class="archive__item-title" itemprop="headline">
5252
<p class="archive__item-excerpt" itemprop="description"><p>{{ post.excerpt | markdownify | remove: '<p>' | remove: '</p>' }}<strong><a href="{{ base_path }}{{ post.url }}" rel="permalink"> Read more</a></strong></p></p>
5353
{% endif %}
5454

55+
{% if post.slidesurl %}
56+
<p><a href="{{ post.slidesurl }}"><b>Slides</b></a></p>
57+
{% endif %}
58+
5559
{% if post.citation and post.paperurl %}
5660
<p>Recommended citation: {{ post.citation }} <a href="{{ post.paperurl }}">{{ post.paperurl }}</a></p>
5761
{% elsif post.citation %}

_layouts/single.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646

4747
<section class="page__content" itemprop="text">
4848
{{ content }}
49-
49+
{% if page.slidesurl %}
50+
<p style="font-size: smaller"><a href="{{ page.slidesurl }}">Slides</a></p>
51+
{% endif %}
5052
{% if page.citation and page.paperurl %}
5153
<p style="font-size: smaller">Recommended citation: {{ page.citation }} <a href="{{ page.paperurl }}"><u>{{ page.paperurl }}</u></a></p>
5254
{% elsif page.citation %}

_publications/2009-10-01-paper-title-number-1.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ permalink: /publication/2009-10-01-paper-title-number-1
55
excerpt: 'This paper is about the number 1. The number 2 is left for future work.'
66
date: 2009-10-01
77
venue: 'Journal 1'
8+
slidesurl: 'http://academicpages.github.io/files/slides1.pdf'
89
paperurl: 'http://academicpages.github.io/files/paper1.pdf'
910
citation: 'Your Name, You. (2009). &quot;Paper Title Number 1.&quot; <i>Journal 1</i>. 1(1).'
1011
---
12+
This paper is about the number 1. The number 2 is left for future work.
1113

12-
The contents above will be part of a list of publications, if the user clicks the link for the publication than the contents of section will be rendered as a full page, allowing you to provide more information about the paper for the reader. When publications are displayed as a single page, the contents of the above "citation" field will automatically be included below this section in a smaller font.
14+
[Download slides here](http://academicpages.github.io/files/slides1.pdf)
15+
16+
[Download paper here](http://academicpages.github.io/files/paper1.pdf)
17+
18+
Recommended citation: Your Name, You. (2009). "Paper Title Number 1." <i>Journal 1</i>. 1(1).

_publications/2010-10-01-paper-title-number-2.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ permalink: /publication/2010-10-01-paper-title-number-2
55
excerpt: 'This paper is about the number 2. The number 3 is left for future work.'
66
date: 2010-10-01
77
venue: 'Journal 1'
8+
slidesurl: 'http://academicpages.github.io/files/slides2.pdf'
89
paperurl: 'http://academicpages.github.io/files/paper2.pdf'
910
citation: 'Your Name, You. (2010). &quot;Paper Title Number 2.&quot; <i>Journal 1</i>. 1(2).'
1011
---
12+
This paper is about the number 2. The number 3 is left for future work.
1113

12-
The contents above will be part of a list of publications, if the user clicks the link for the publication than the contents of section will be rendered as a full page, allowing you to provide more information about the paper for the reader. When publications are displayed as a single page, the contents of the above "citation" field will automatically be included below this section in a smaller font.
14+
[Download slides here](http://academicpages.github.io/files/slides2.pdf)
15+
16+
[Download paper here](http://academicpages.github.io/files/paper2.pdf)
17+
18+
Recommended citation: Your Name, You. (2010). "Paper Title Number 2." <i>Journal 1</i>. 1(2).

_publications/2015-10-01-paper-title-number-3.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ permalink: /publication/2015-10-01-paper-title-number-3
55
excerpt: 'This paper is about the number 3. The number 4 is left for future work.'
66
date: 2015-10-01
77
venue: 'Journal 1'
8+
slidesurl: 'http://academicpages.github.io/files/slides3.pdf'
89
paperurl: 'http://academicpages.github.io/files/paper3.pdf'
910
citation: 'Your Name, You. (2015). &quot;Paper Title Number 3.&quot; <i>Journal 1</i>. 1(3).'
1011
---
12+
This paper is about the number 3. The number 4 is left for future work.
1113

12-
The contents above will be part of a list of publications, if the user clicks the link for the publication than the contents of section will be rendered as a full page, allowing you to provide more information about the paper for the reader. When publications are displayed as a single page, the contents of the above "citation" field will automatically be included below this section in a smaller font.
14+
[Download slides here](http://academicpages.github.io/files/slides3.pdf)
15+
16+
[Download paper here](http://academicpages.github.io/files/paper3.pdf)
17+
18+
Recommended citation: Your Name, You. (2015). "Paper Title Number 3." <i>Journal 1</i>. 1(3).

files/slides1.pdf

14.9 KB
Binary file not shown.

files/slides2.pdf

15.2 KB
Binary file not shown.

files/slides3.pdf

15.2 KB
Binary file not shown.

markdown_generator/publications.ipynb

+64-33
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
},
3232
{
3333
"cell_type": "code",
34-
"execution_count": 1,
34+
"execution_count": 10,
3535
"metadata": {
3636
"collapsed": false
3737
},
@@ -40,10 +40,10 @@
4040
"name": "stdout",
4141
"output_type": "stream",
4242
"text": [
43-
"pub_date\ttitle\tvenue\texcerpt\tcitation\turl_slug\tpaper_url\r\n",
44-
"2009-10-01\tPaper Title Number 1\tJournal 1\tThis paper is about the number 1. The number 2 is left for future work.\tYour Name, You. (2009). \"Paper Title Number 1.\" <i>Journal 1</i>. 1(1).\tpaper-title-number-1\thttp://academicpages.github.io/files/paper1.pdf\r\n",
45-
"2010-10-01\tPaper Title Number 2\tJournal 1\tThis paper is about the number 2. The number 3 is left for future work.\tYour Name, You. (2010). \"Paper Title Number 2.\" <i>Journal 1</i>. 1(2).\tpaper-title-number-2\thttp://academicpages.github.io/files/paper2.pdf\r\n",
46-
"2015-10-01\tPaper Title Number 3\tJournal 1\tThis paper is about the number 3. The number 4 is left for future work.\tYour Name, You. (2015). \"Paper Title Number 3.\" <i>Journal 1</i>. 1(3).\tpaper-title-number-3\thttp://academicpages.github.io/files/paper3.pdf"
43+
"pub_date\ttitle\tvenue\texcerpt\tcitation\turl_slug\tpaper_url\tslides_url\n",
44+
"2009-10-01\tPaper Title Number 1\tJournal 1\tThis paper is about the number 1. The number 2 is left for future work.\tYour Name, You. (2009). \"Paper Title Number 1.\" <i>Journal 1</i>. 1(1).\tpaper-title-number-1\thttp://academicpages.github.io/files/paper1.pdf\thttp://academicpages.github.io/files/slides1.pdf\n",
45+
"2010-10-01\tPaper Title Number 2\tJournal 1\tThis paper is about the number 2. The number 3 is left for future work.\tYour Name, You. (2010). \"Paper Title Number 2.\" <i>Journal 1</i>. 1(2).\tpaper-title-number-2\thttp://academicpages.github.io/files/paper2.pdf\thttp://academicpages.github.io/files/slides2.pdf\n",
46+
"2015-10-01\tPaper Title Number 3\tJournal 1\tThis paper is about the number 3. The number 4 is left for future work.\tYour Name, You. (2015). \"Paper Title Number 3.\" <i>Journal 1</i>. 1(3).\tpaper-title-number-3\thttp://academicpages.github.io/files/paper3.pdf\thttp://academicpages.github.io/files/slides3.pdf"
4747
]
4848
}
4949
],
@@ -62,7 +62,7 @@
6262
},
6363
{
6464
"cell_type": "code",
65-
"execution_count": 2,
65+
"execution_count": 11,
6666
"metadata": {
6767
"collapsed": true,
6868
"deletable": true,
@@ -86,7 +86,7 @@
8686
},
8787
{
8888
"cell_type": "code",
89-
"execution_count": 3,
89+
"execution_count": 12,
9090
"metadata": {
9191
"collapsed": false,
9292
"deletable": true,
@@ -97,6 +97,19 @@
9797
"data": {
9898
"text/html": [
9999
"<div>\n",
100+
"<style scoped>\n",
101+
" .dataframe tbody tr th:only-of-type {\n",
102+
" vertical-align: middle;\n",
103+
" }\n",
104+
"\n",
105+
" .dataframe tbody tr th {\n",
106+
" vertical-align: top;\n",
107+
" }\n",
108+
"\n",
109+
" .dataframe thead th {\n",
110+
" text-align: right;\n",
111+
" }\n",
112+
"</style>\n",
100113
"<table border=\"1\" class=\"dataframe\">\n",
101114
" <thead>\n",
102115
" <tr style=\"text-align: right;\">\n",
@@ -108,6 +121,7 @@
108121
" <th>citation</th>\n",
109122
" <th>url_slug</th>\n",
110123
" <th>paper_url</th>\n",
124+
" <th>slides_url</th>\n",
111125
" </tr>\n",
112126
" </thead>\n",
113127
" <tbody>\n",
@@ -120,6 +134,7 @@
120134
" <td>Your Name, You. (2009). \"Paper Title Number 1....</td>\n",
121135
" <td>paper-title-number-1</td>\n",
122136
" <td>http://academicpages.github.io/files/paper1.pdf</td>\n",
137+
" <td>http://academicpages.github.io/files/slides1.pdf</td>\n",
123138
" </tr>\n",
124139
" <tr>\n",
125140
" <th>1</th>\n",
@@ -130,6 +145,7 @@
130145
" <td>Your Name, You. (2010). \"Paper Title Number 2....</td>\n",
131146
" <td>paper-title-number-2</td>\n",
132147
" <td>http://academicpages.github.io/files/paper2.pdf</td>\n",
148+
" <td>http://academicpages.github.io/files/slides2.pdf</td>\n",
133149
" </tr>\n",
134150
" <tr>\n",
135151
" <th>2</th>\n",
@@ -140,6 +156,7 @@
140156
" <td>Your Name, You. (2015). \"Paper Title Number 3....</td>\n",
141157
" <td>paper-title-number-3</td>\n",
142158
" <td>http://academicpages.github.io/files/paper3.pdf</td>\n",
159+
" <td>http://academicpages.github.io/files/slides3.pdf</td>\n",
143160
" </tr>\n",
144161
" </tbody>\n",
145162
"</table>\n",
@@ -161,13 +178,18 @@
161178
"1 Your Name, You. (2010). \"Paper Title Number 2.... paper-title-number-2 \n",
162179
"2 Your Name, You. (2015). \"Paper Title Number 3.... paper-title-number-3 \n",
163180
"\n",
164-
" paper_url \n",
165-
"0 http://academicpages.github.io/files/paper1.pdf \n",
166-
"1 http://academicpages.github.io/files/paper2.pdf \n",
167-
"2 http://academicpages.github.io/files/paper3.pdf "
181+
" paper_url \\\n",
182+
"0 http://academicpages.github.io/files/paper1.pdf \n",
183+
"1 http://academicpages.github.io/files/paper2.pdf \n",
184+
"2 http://academicpages.github.io/files/paper3.pdf \n",
185+
"\n",
186+
" slides_url \n",
187+
"0 http://academicpages.github.io/files/slides1.pdf \n",
188+
"1 http://academicpages.github.io/files/slides2.pdf \n",
189+
"2 http://academicpages.github.io/files/slides3.pdf "
168190
]
169191
},
170-
"execution_count": 3,
192+
"execution_count": 12,
171193
"metadata": {},
172194
"output_type": "execute_result"
173195
}
@@ -188,7 +210,7 @@
188210
},
189211
{
190212
"cell_type": "code",
191-
"execution_count": 4,
213+
"execution_count": 13,
192214
"metadata": {
193215
"collapsed": true,
194216
"deletable": true,
@@ -218,7 +240,7 @@
218240
},
219241
{
220242
"cell_type": "code",
221-
"execution_count": 5,
243+
"execution_count": 14,
222244
"metadata": {
223245
"collapsed": false,
224246
"deletable": true,
@@ -248,6 +270,9 @@
248270
" \n",
249271
" md += \"\\nvenue: '\" + html_escape(item.venue) + \"'\"\n",
250272
" \n",
273+
" if len(str(item.slides_url)) > 5:\n",
274+
" md += \"\\nslidesurl: '\" + item.slides_url + \"'\"\n",
275+
"\n",
251276
" if len(str(item.paper_url)) > 5:\n",
252277
" md += \"\\npaperurl: '\" + item.paper_url + \"'\"\n",
253278
" \n",
@@ -259,7 +284,10 @@
259284
" \n",
260285
" if len(str(item.excerpt)) > 5:\n",
261286
" md += \"\\n\" + html_escape(item.excerpt) + \"\\n\"\n",
262-
" \n",
287+
"\n",
288+
" if len(str(item.slides_url)) > 5:\n",
289+
" md += \"\\n[Download slides here](\" + item.slides_url + \")\\n\" \n",
290+
"\n",
263291
" if len(str(item.paper_url)) > 5:\n",
264292
" md += \"\\n[Download paper here](\" + item.paper_url + \")\\n\" \n",
265293
" \n",
@@ -280,7 +308,7 @@
280308
},
281309
{
282310
"cell_type": "code",
283-
"execution_count": 6,
311+
"execution_count": 15,
284312
"metadata": {
285313
"collapsed": false,
286314
"deletable": true,
@@ -291,8 +319,8 @@
291319
"name": "stdout",
292320
"output_type": "stream",
293321
"text": [
294-
"2009-10-01-paper-title-number-1.md 2015-10-01-paper-title-number-3.md\r\n",
295-
"2010-10-01-paper-title-number-2.md\r\n"
322+
"2009-10-01-paper-title-number-1.md 2015-10-01-paper-title-number-3.md\n",
323+
"2010-10-01-paper-title-number-2.md 2024-02-17-paper-title-number-4.md\n"
296324
]
297325
}
298326
],
@@ -302,7 +330,7 @@
302330
},
303331
{
304332
"cell_type": "code",
305-
"execution_count": 7,
333+
"execution_count": 16,
306334
"metadata": {
307335
"collapsed": false,
308336
"deletable": true,
@@ -313,20 +341,23 @@
313341
"name": "stdout",
314342
"output_type": "stream",
315343
"text": [
316-
"---\r\n",
317-
"title: \"Paper Title Number 1\"\r\n",
318-
"collection: publications\r\n",
319-
"permalink: /publication/2009-10-01-paper-title-number-1\r\n",
320-
"excerpt: 'This paper is about the number 1. The number 2 is left for future work.'\r\n",
321-
"date: 2009-10-01\r\n",
322-
"venue: 'Journal 1'\r\n",
323-
"paperurl: 'http://academicpages.github.io/files/paper1.pdf'\r\n",
324-
"citation: 'Your Name, You. (2009). &quot;Paper Title Number 1.&quot; <i>Journal 1</i>. 1(1).'\r\n",
325-
"---\r\n",
326-
"This paper is about the number 1. The number 2 is left for future work.\r\n",
327-
"\r\n",
328-
"[Download paper here](http://academicpages.github.io/files/paper1.pdf)\r\n",
329-
"\r\n",
344+
"---\n",
345+
"title: \"Paper Title Number 1\"\n",
346+
"collection: publications\n",
347+
"permalink: /publication/2009-10-01-paper-title-number-1\n",
348+
"excerpt: 'This paper is about the number 1. The number 2 is left for future work.'\n",
349+
"date: 2009-10-01\n",
350+
"venue: 'Journal 1'\n",
351+
"slidesurl: 'http://academicpages.github.io/files/slides1.pdf'\n",
352+
"paperurl: 'http://academicpages.github.io/files/paper1.pdf'\n",
353+
"citation: 'Your Name, You. (2009). &quot;Paper Title Number 1.&quot; <i>Journal 1</i>. 1(1).'\n",
354+
"---\n",
355+
"This paper is about the number 1. The number 2 is left for future work.\n",
356+
"\n",
357+
"[Download slides here](http://academicpages.github.io/files/slides1.pdf)\n",
358+
"\n",
359+
"[Download paper here](http://academicpages.github.io/files/paper1.pdf)\n",
360+
"\n",
330361
"Recommended citation: Your Name, You. (2009). \"Paper Title Number 1.\" <i>Journal 1</i>. 1(1)."
331362
]
332363
}

markdown_generator/publications.tsv

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pub_date title venue excerpt citation url_slug paper_url
2-
2009-10-01 Paper Title Number 1 Journal 1 This paper is about the number 1. The number 2 is left for future work. Your Name, You. (2009). "Paper Title Number 1." <i>Journal 1</i>. 1(1). paper-title-number-1 http://academicpages.github.io/files/paper1.pdf
3-
2010-10-01 Paper Title Number 2 Journal 1 This paper is about the number 2. The number 3 is left for future work. Your Name, You. (2010). "Paper Title Number 2." <i>Journal 1</i>. 1(2). paper-title-number-2 http://academicpages.github.io/files/paper2.pdf
4-
2015-10-01 Paper Title Number 3 Journal 1 This paper is about the number 3. The number 4 is left for future work. Your Name, You. (2015). "Paper Title Number 3." <i>Journal 1</i>. 1(3). paper-title-number-3 http://academicpages.github.io/files/paper3.pdf
1+
pub_date title venue excerpt citation url_slug paper_url slides_url
2+
2009-10-01 Paper Title Number 1 Journal 1 This paper is about the number 1. The number 2 is left for future work. Your Name, You. (2009). "Paper Title Number 1." <i>Journal 1</i>. 1(1). paper-title-number-1 http://academicpages.github.io/files/paper1.pdf http://academicpages.github.io/files/slides1.pdf
3+
2010-10-01 Paper Title Number 2 Journal 1 This paper is about the number 2. The number 3 is left for future work. Your Name, You. (2010). "Paper Title Number 2." <i>Journal 1</i>. 1(2). paper-title-number-2 http://academicpages.github.io/files/paper2.pdf http://academicpages.github.io/files/slides2.pdf
4+
2015-10-01 Paper Title Number 3 Journal 1 This paper is about the number 3. The number 4 is left for future work. Your Name, You. (2015). "Paper Title Number 3." <i>Journal 1</i>. 1(3). paper-title-number-3 http://academicpages.github.io/files/paper3.pdf http://academicpages.github.io/files/slides3.pdf

0 commit comments

Comments
 (0)