Skip to content

Commit 3d078df

Browse files
authored
Merge pull request #2923 from FHYQ-Dong/master
add `Download Bibtex` link in publication items and publication page
2 parents f40366b + af16ab9 commit 3d078df

File tree

4 files changed

+42
-4
lines changed

4 files changed

+42
-4
lines changed

_includes/archive-single.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,32 @@ <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.citation and post.paperurl and post.slidesurl %}
55+
{% if post.citation and post.paperurl and post.slidesurl and post.bibtexurl %}
56+
<p>Recommended citation: {{ post.citation }}<br /><a href="{{ post.paperurl }}">Download Paper</a> | <a href="{{ post.slidesurl }}">Download Slides</a> | <a href="{{ post.bibtexurl }}">Download Bibtex</a></p>
57+
{% elsif post.citation and post.paperurl and post.slidesurl %}
5658
<p>Recommended citation: {{ post.citation }}<br /><a href="{{ post.paperurl }}">Download Paper</a> | <a href="{{ post.slidesurl }}">Download Slides</a></p>
59+
{% elsif post.citation and post.paperurl and post.bibtexurl %}
60+
<p>Recommended citation: {{ post.citation }}<br /><a href="{{ post.paperurl }}">Download Paper</a> | <a href="{{ post.bibtexurl }}">Download Bibtex</a></p>
5761
{% elsif post.citation and post.paperurl %}
5862
<p>Recommended citation: {{ post.citation }}<br /><a href="{{ post.paperurl }}">Download Paper</a></p>
63+
{% elsif post.citation and post.slidesurl and post.bibtexurl %}
64+
<p>Recommended citation: {{ post.citation }}<br /><a href="{{ post.slidesurl }}">Download Slides</a> | <a href="{{ post.bibtexurl}}">Download Bibtex</a></p>
5965
{% elsif post.citation and post.slidesurl %}
6066
<p>Recommended citation: {{ post.citation }}<br /><a href="{{ post.slidesurl }}">Download Slides</a></p>
67+
{% elsif post.citation and post.bibtexurl %}
68+
<p>Recommended citation: {{ post.citation }}<br /><a href="{{ post.bibtexurl }}">Download Bibtex</a></p>
6169
{% elsif post.citation %}
6270
<p>Recommended citation: {{ post.citation }}</p>
71+
{% elsif post.paperurl and post.bibtexurl %}
72+
<p><a href=" {{ post.paperurl }} ">Download Paper</a> | <a href="{{ post.bibtexurl }}">Download Bibtex</a></p>
6373
{% elsif post.paperurl %}
6474
<p><a href=" {{ post.paperurl }} ">Download Paper</a></p>
75+
{% elsif post.slidesurl and post.bibtexurl %}
76+
<p><a href="{{ post.slidesurl }}">Download Slides</a> | <a href="{{ post.bibtexurl }}">Download Bibtex</a></p>
6577
{% elsif post.slidesurl %}
6678
<p><a href="{{ post.slidesurl }}">Download Slides</a></p>
79+
{% elsif post.bibtexurl %}
80+
<p><a href="{{ post.bibtexurl }}">Download Bibtex</a></p>
6781
{% endif %}
6882

6983
</article>

_layouts/single.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,30 @@
4747
<section class="page__content" itemprop="text">
4848
{{ content }}
4949

50-
{% if page.citation and page.paperurl and page.slidesurl %}
50+
{% if page.citation and page.paperurl and page.slidesurl and page.bibtexurl %}
51+
<p style="font-size: smaller">Recommended citation: {{ page.citation }}<br /><a href="{{ page.paperurl }}">Download Paper</a> | <a href="{{ page.slidesurl }}">Download Slides</a> | <a href="{{ page.bibtexurl }}">Download Bibtex</a></p>
52+
{% elsif page.citation and page.paperurl and page.slidesurl %}
5153
<p style="font-size: smaller">Recommended citation: {{ page.citation }}<br /><a href="{{ page.paperurl }}">Download Paper</a> | <a href="{{ page.slidesurl }}">Download Slides</a></p>
54+
{% elsif page.citation and page.paperurl and page.bibtexurl %}
55+
<p style="font-size: smaller">Recommended citation: {{ page.citation }}<br /><a href="{{ page.paperurl }}">Download Paper</a> | <a href="{{ page.bibtexurl }}">Download Bibtex</a></p>
5256
{% elsif page.citation and page.paperurl %}
5357
<p style="font-size: smaller">Recommended citation: {{ page.citation }}<br /><a href="{{ page.paperurl }}">Download Paper</a></p>
58+
{% elsif page.citation and page.slidesurl and page.bibtexurl %}
59+
<p style="font-size: smaller">Recommended citation: {{ page.citation }}<br /><a href="{{ page.slidesurl }}">Download Slides</a> | <a href="{{ page.bibtexurl }}">Download Bibtex</a></p>
5460
{% elsif page.citation and page.slidesurl %}
5561
<p style="font-size: smaller">Recommended citation: {{ page.citation }}<br /><a href="{{ page.slidesurl }}">Download Slides</a></p>
62+
{% elsif page.slidesurl and page.bibtexurl %}
63+
<p style="font-size: smaller"><a href="{{ page.slidesurl }}">Download Slides</a> | <a href="{{ page.bibtexurl }}">Download Bibtex</a></p>
64+
{% elsif page.paperurl and page.bibtexurl %}
65+
<p style="font-size: smaller"><a href="{{ page.paperurl }}">Download Paper</a> | <a href="{{ page.bibtexurl }}">Download Bibtex</a></p>
66+
{% elsif page.citation and page.bibtexurl %}
67+
<p style="font-size: smaller">Recommended citation: {{ page.citation }}<br /><a href="{{ page.bibtexurl }}">Download Bibtex</a></p>
5668
{% elsif page.citation %}
5769
<p style="font-size: smaller">Recommended citation: {{ page.citation }}</p>
5870
{% elsif page.slidesurl %}
5971
<p style="font-size: smaller"><a href="{{ page.slidesurl }}">Download Slides</a></p>
72+
{% elsif page.bibtexurl %}
73+
<p style="font-size: smaller"><a href="{{ page.bibtexurl }}">Download Bibtex</a></p>
6074
{% endif %}
6175

6276
{% 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 %}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ date: 2009-10-01
88
venue: 'Journal 1'
99
slidesurl: 'http://academicpages.github.io/files/slides1.pdf'
1010
paperurl: 'http://academicpages.github.io/files/paper1.pdf'
11+
bibtexurl: 'http://academicpages.github.io/files/bibtex1.bib'
1112
citation: 'Your Name, You. (2009). &quot;Paper Title Number 1.&quot; <i>Journal 1</i>. 1(1).'
1213
---
13-
14-
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+
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.

files/bibtex1.bib

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@article{Alice2023example,
2+
title={An Example Article},
3+
author={Alice, Bob and Charlie},
4+
journal={Journal of Examples},
5+
volume={12},
6+
number={3},
7+
pages={123--456},
8+
year={2023},
9+
publisher={Example Publisher}
10+
}

0 commit comments

Comments
 (0)