Skip to content

Support for slide links in publication pages #2126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions _includes/archive-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,18 @@ <h2 class="archive__item-title" itemprop="headline">
<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>
{% endif %}

{% if post.citation and post.paperurl %}
{% if post.citation and post.paperurl and post.slidesurl %}
<p>Recommended citation: {{ post.citation }} <a href="{{ post.paperurl }}">{{ post.paperurl }}</a> <a href="{{ post.slidesurl }}">Slides</a></p>
{% elsif post.citation and post.paperurl %}
<p>Recommended citation: {{ post.citation }} <a href="{{ post.paperurl }}">{{ post.paperurl }}</a></p>
{% elsif post.citation and post.slidesurl %}
<p>Recommended citation: {{ post.citation }} <a href="{{ post.slidesurl }}">Slides</a></p>
{% elsif post.citation %}
<p>Recommended citation: {{ post.citation }} </p>
<p>Recommended citation: {{ post.citation }}</p>
{% elsif post.paperurl %}
<p class="wordwrap">Download <a href=" {{ post.paperurl }} ">here</a></p>
{% elseif post.slidesurl %}
<p>Download <a href="{{ post.slidesurl }}">Slides</a></p></p>
{% endif %}

</article>
Expand Down
10 changes: 8 additions & 2 deletions _layouts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,16 @@
<section class="page__content" itemprop="text">
{{ content }}

{% if page.citation and page.paperurl %}
{% if page.citation and page.paperurl and page.slidesurl %}
<p style="font-size: smaller">Recommended citation: {{ page.citation }} <a href="{{ page.paperurl }}"><u>{{ page.paperurl }}</u></a> <a href="{{ page.slidesurl }}">Slides</a></p>
{% elsif page.citation and page.paperurl %}
<p style="font-size: smaller">Recommended citation: {{ page.citation }} <a href="{{ page.paperurl }}"><u>{{ page.paperurl }}</u></a></p>
{% elsif page.citation and page.slidesurl %}
<p style="font-size: smaller">Recommended citation: {{ page.citation }} <a href="{{ page.slidesurl }}">Slides</a></p>
{% elsif page.citation %}
<p style="font-size: smaller">Recommended citation: {{ page.citation }} </p>
<p style="font-size: smaller">Recommended citation: {{ page.citation }}</p>
{% elsif page.slidesurl %}
<p style="font-size: smaller"><a href="{{ page.slidesurl }}">Slides</a></p>
{% endif %}

{% if page.link %}<div><a href="{{ page.link }}" class="btn">{{ site.data.ui-text[site.locale].ext_link_label | default: "Direct Link" }}</a></div>{% endif %}
Expand Down
3 changes: 2 additions & 1 deletion _publications/2009-10-01-paper-title-number-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ permalink: /publication/2009-10-01-paper-title-number-1
excerpt: 'This paper is about the number 1. The number 2 is left for future work.'
date: 2009-10-01
venue: 'Journal 1'
slidesurl: 'http://academicpages.github.io/files/slides1.pdf'
paperurl: 'http://academicpages.github.io/files/paper1.pdf'
citation: 'Your Name, You. (2009). &quot;Paper Title Number 1.&quot; <i>Journal 1</i>. 1(1).'
---

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.
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.
3 changes: 2 additions & 1 deletion _publications/2010-10-01-paper-title-number-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ permalink: /publication/2010-10-01-paper-title-number-2
excerpt: 'This paper is about the number 2. The number 3 is left for future work.'
date: 2010-10-01
venue: 'Journal 1'
slidesurl: 'http://academicpages.github.io/files/slides2.pdf'
paperurl: 'http://academicpages.github.io/files/paper2.pdf'
citation: 'Your Name, You. (2010). &quot;Paper Title Number 2.&quot; <i>Journal 1</i>. 1(2).'
---

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.
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.
3 changes: 2 additions & 1 deletion _publications/2015-10-01-paper-title-number-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ permalink: /publication/2015-10-01-paper-title-number-3
excerpt: 'This paper is about the number 3. The number 4 is left for future work.'
date: 2015-10-01
venue: 'Journal 1'
slidesurl: 'http://academicpages.github.io/files/slides3.pdf'
paperurl: 'http://academicpages.github.io/files/paper3.pdf'
citation: 'Your Name, You. (2015). &quot;Paper Title Number 3.&quot; <i>Journal 1</i>. 1(3).'
---

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.
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.
Binary file added files/slides1.pdf
Binary file not shown.
Binary file added files/slides2.pdf
Binary file not shown.
Binary file added files/slides3.pdf
Binary file not shown.
97 changes: 64 additions & 33 deletions markdown_generator/publications.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 10,
"metadata": {
"collapsed": false
},
Expand All @@ -40,10 +40,10 @@
"name": "stdout",
"output_type": "stream",
"text": [
"pub_date\ttitle\tvenue\texcerpt\tcitation\turl_slug\tpaper_url\r\n",
"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",
"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",
"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"
"pub_date\ttitle\tvenue\texcerpt\tcitation\turl_slug\tpaper_url\tslides_url\n",
"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",
"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",
"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"
]
}
],
Expand All @@ -62,7 +62,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 11,
"metadata": {
"collapsed": true,
"deletable": true,
Expand All @@ -86,7 +86,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 12,
"metadata": {
"collapsed": false,
"deletable": true,
Expand All @@ -97,6 +97,19 @@
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
Expand All @@ -108,6 +121,7 @@
" <th>citation</th>\n",
" <th>url_slug</th>\n",
" <th>paper_url</th>\n",
" <th>slides_url</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
Expand All @@ -120,6 +134,7 @@
" <td>Your Name, You. (2009). \"Paper Title Number 1....</td>\n",
" <td>paper-title-number-1</td>\n",
" <td>http://academicpages.github.io/files/paper1.pdf</td>\n",
" <td>http://academicpages.github.io/files/slides1.pdf</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
Expand All @@ -130,6 +145,7 @@
" <td>Your Name, You. (2010). \"Paper Title Number 2....</td>\n",
" <td>paper-title-number-2</td>\n",
" <td>http://academicpages.github.io/files/paper2.pdf</td>\n",
" <td>http://academicpages.github.io/files/slides2.pdf</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
Expand All @@ -140,6 +156,7 @@
" <td>Your Name, You. (2015). \"Paper Title Number 3....</td>\n",
" <td>paper-title-number-3</td>\n",
" <td>http://academicpages.github.io/files/paper3.pdf</td>\n",
" <td>http://academicpages.github.io/files/slides3.pdf</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
Expand All @@ -161,13 +178,18 @@
"1 Your Name, You. (2010). \"Paper Title Number 2.... paper-title-number-2 \n",
"2 Your Name, You. (2015). \"Paper Title Number 3.... paper-title-number-3 \n",
"\n",
" paper_url \n",
"0 http://academicpages.github.io/files/paper1.pdf \n",
"1 http://academicpages.github.io/files/paper2.pdf \n",
"2 http://academicpages.github.io/files/paper3.pdf "
" paper_url \\\n",
"0 http://academicpages.github.io/files/paper1.pdf \n",
"1 http://academicpages.github.io/files/paper2.pdf \n",
"2 http://academicpages.github.io/files/paper3.pdf \n",
"\n",
" slides_url \n",
"0 http://academicpages.github.io/files/slides1.pdf \n",
"1 http://academicpages.github.io/files/slides2.pdf \n",
"2 http://academicpages.github.io/files/slides3.pdf "
]
},
"execution_count": 3,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -188,7 +210,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 13,
"metadata": {
"collapsed": true,
"deletable": true,
Expand Down Expand Up @@ -218,7 +240,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 14,
"metadata": {
"collapsed": false,
"deletable": true,
Expand Down Expand Up @@ -248,6 +270,9 @@
" \n",
" md += \"\\nvenue: '\" + html_escape(item.venue) + \"'\"\n",
" \n",
" if len(str(item.slides_url)) > 5:\n",
" md += \"\\nslidesurl: '\" + item.slides_url + \"'\"\n",
"\n",
" if len(str(item.paper_url)) > 5:\n",
" md += \"\\npaperurl: '\" + item.paper_url + \"'\"\n",
" \n",
Expand All @@ -259,7 +284,10 @@
" \n",
" if len(str(item.excerpt)) > 5:\n",
" md += \"\\n\" + html_escape(item.excerpt) + \"\\n\"\n",
" \n",
"\n",
" if len(str(item.slides_url)) > 5:\n",
" md += \"\\n[Download slides here](\" + item.slides_url + \")\\n\" \n",
"\n",
" if len(str(item.paper_url)) > 5:\n",
" md += \"\\n[Download paper here](\" + item.paper_url + \")\\n\" \n",
" \n",
Expand All @@ -280,7 +308,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 15,
"metadata": {
"collapsed": false,
"deletable": true,
Expand All @@ -291,8 +319,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"2009-10-01-paper-title-number-1.md 2015-10-01-paper-title-number-3.md\r\n",
"2010-10-01-paper-title-number-2.md\r\n"
"2009-10-01-paper-title-number-1.md 2015-10-01-paper-title-number-3.md\n",
"2010-10-01-paper-title-number-2.md 2024-02-17-paper-title-number-4.md\n"
]
}
],
Expand All @@ -302,7 +330,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 16,
"metadata": {
"collapsed": false,
"deletable": true,
Expand All @@ -313,20 +341,23 @@
"name": "stdout",
"output_type": "stream",
"text": [
"---\r\n",
"title: \"Paper Title Number 1\"\r\n",
"collection: publications\r\n",
"permalink: /publication/2009-10-01-paper-title-number-1\r\n",
"excerpt: 'This paper is about the number 1. The number 2 is left for future work.'\r\n",
"date: 2009-10-01\r\n",
"venue: 'Journal 1'\r\n",
"paperurl: 'http://academicpages.github.io/files/paper1.pdf'\r\n",
"citation: 'Your Name, You. (2009). &quot;Paper Title Number 1.&quot; <i>Journal 1</i>. 1(1).'\r\n",
"---\r\n",
"This paper is about the number 1. The number 2 is left for future work.\r\n",
"\r\n",
"[Download paper here](http://academicpages.github.io/files/paper1.pdf)\r\n",
"\r\n",
"---\n",
"title: \"Paper Title Number 1\"\n",
"collection: publications\n",
"permalink: /publication/2009-10-01-paper-title-number-1\n",
"excerpt: 'This paper is about the number 1. The number 2 is left for future work.'\n",
"date: 2009-10-01\n",
"venue: 'Journal 1'\n",
"slidesurl: 'http://academicpages.github.io/files/slides1.pdf'\n",
"paperurl: 'http://academicpages.github.io/files/paper1.pdf'\n",
"citation: 'Your Name, You. (2009). &quot;Paper Title Number 1.&quot; <i>Journal 1</i>. 1(1).'\n",
"---\n",
"This paper is about the number 1. The number 2 is left for future work.\n",
"\n",
"[Download slides here](http://academicpages.github.io/files/slides1.pdf)\n",
"\n",
"[Download paper here](http://academicpages.github.io/files/paper1.pdf)\n",
"\n",
"Recommended citation: Your Name, You. (2009). \"Paper Title Number 1.\" <i>Journal 1</i>. 1(1)."
]
}
Expand Down
8 changes: 4 additions & 4 deletions markdown_generator/publications.tsv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub_date title venue excerpt citation url_slug paper_url
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
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
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
pub_date title venue excerpt citation url_slug paper_url slides_url
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
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
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