Skip to content

Commit 4097d7e

Browse files
committed
Closes academicpages#48 with a more general and customizable approach
1 parent aff2053 commit 4097d7e

7 files changed

+49
-16
lines changed

_config.yml

+9
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ author:
7373
youtube : # Username
7474
zhihu : # URL
7575

76+
# Publication Category - The following the list of publication categories and their headings
77+
publication_category:
78+
books:
79+
title: 'Books'
80+
manuscripts:
81+
title: 'Journal Articles'
82+
conferences:
83+
title: 'Conference Papers'
7684

7785
# Site Settings
7886
teaser : # filename of teaser fallback teaser image placed in /images/, .e.g. "500x300.png"
@@ -152,6 +160,7 @@ exclude:
152160
- "*.sublime-workspace"
153161
- .asset-cache
154162
- .bundle
163+
- .github
155164
- .jekyll-assets-cache
156165
- .sass-cache
157166
- assets/js/_main.js

_pages/publications.html

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
layout: archive
3+
title: "Publications"
4+
permalink: /publications/
5+
author_profile: true
6+
---
7+
8+
{% if site.author.googlescholar %}
9+
<div class="wordwrap">You can also find my articles on <a href="{{site.author.googlescholar}}">my Google Scholar profile</a>.</div>
10+
{% endif %}
11+
12+
{% include base_path %}
13+
14+
<!-- New style rendering if publication categories are defined -->
15+
{% if site.publication_category %}
16+
{% for category in site.publication_category %}
17+
{% assign title_shown = false %}
18+
{% for post in site.publications reversed %}
19+
{% if post.category != category[0] %}
20+
{% continue %}
21+
{% endif %}
22+
{% unless title_shown %}
23+
<h2>{{ category[1].title }}</h2><hr />
24+
{% assign title_shown = true %}
25+
{% endunless %}
26+
{% include archive-single.html %}
27+
{% endfor %}
28+
{% endfor %}
29+
{% else %}
30+
{% for post in site.publications reversed %}
31+
{% include archive-single.html %}
32+
{% endfor %}
33+
{% endif %}
34+
35+
36+

_pages/publications.md

-16
This file was deleted.

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

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "Paper Title Number 1"
33
collection: publications
4+
category: manuscripts
45
permalink: /publication/2009-10-01-paper-title-number-1
56
excerpt: 'This paper is about the number 1. The number 2 is left for future work.'
67
date: 2009-10-01

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

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "Paper Title Number 2"
33
collection: publications
4+
category: manuscripts
45
permalink: /publication/2010-10-01-paper-title-number-2
56
excerpt: 'This paper is about the number 2. The number 3 is left for future work.'
67
date: 2010-10-01

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

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "Paper Title Number 3"
33
collection: publications
4+
category: manuscripts
45
permalink: /publication/2015-10-01-paper-title-number-3
56
excerpt: 'This paper is about the number 3. The number 4 is left for future work.'
67
date: 2015-10-01

_publications/2024-02-17-paper-title-number-4.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "Paper Title Number 4"
33
collection: publications
4+
category: conferences
45
permalink: /publication/2024-02-17-paper-title-number-4
56
excerpt: 'This paper is about fixing template issue #693.'
67
date: 2024-02-17

0 commit comments

Comments
 (0)