From 4097d7e54a0780ea4f8ad109df0f7773df0074c9 Mon Sep 17 00:00:00 2001 From: rjzupkoii Date: Sun, 11 Aug 2024 17:23:09 -0400 Subject: [PATCH] Closes #48 with a more general and customizable approach --- _config.yml | 9 +++++ _pages/publications.html | 36 +++++++++++++++++++ _pages/publications.md | 16 --------- .../2009-10-01-paper-title-number-1.md | 1 + .../2010-10-01-paper-title-number-2.md | 1 + .../2015-10-01-paper-title-number-3.md | 1 + .../2024-02-17-paper-title-number-4.md | 1 + 7 files changed, 49 insertions(+), 16 deletions(-) create mode 100644 _pages/publications.html delete mode 100644 _pages/publications.md diff --git a/_config.yml b/_config.yml index 1be8f1facd6a2..2fbbf0211b32e 100644 --- a/_config.yml +++ b/_config.yml @@ -73,6 +73,14 @@ author: youtube : # Username zhihu : # URL +# Publication Category - The following the list of publication categories and their headings +publication_category: + books: + title: 'Books' + manuscripts: + title: 'Journal Articles' + conferences: + title: 'Conference Papers' # Site Settings teaser : # filename of teaser fallback teaser image placed in /images/, .e.g. "500x300.png" @@ -152,6 +160,7 @@ exclude: - "*.sublime-workspace" - .asset-cache - .bundle + - .github - .jekyll-assets-cache - .sass-cache - assets/js/_main.js diff --git a/_pages/publications.html b/_pages/publications.html new file mode 100644 index 0000000000000..e2f94618ab9aa --- /dev/null +++ b/_pages/publications.html @@ -0,0 +1,36 @@ +--- +layout: archive +title: "Publications" +permalink: /publications/ +author_profile: true +--- + +{% if site.author.googlescholar %} +
You can also find my articles on my Google Scholar profile.
+{% endif %} + +{% include base_path %} + + +{% if site.publication_category %} + {% for category in site.publication_category %} + {% assign title_shown = false %} + {% for post in site.publications reversed %} + {% if post.category != category[0] %} + {% continue %} + {% endif %} + {% unless title_shown %} +

{{ category[1].title }}


+ {% assign title_shown = true %} + {% endunless %} + {% include archive-single.html %} + {% endfor %} + {% endfor %} +{% else %} + {% for post in site.publications reversed %} + {% include archive-single.html %} + {% endfor %} +{% endif %} + + + diff --git a/_pages/publications.md b/_pages/publications.md deleted file mode 100644 index 81fa2e134bb82..0000000000000 --- a/_pages/publications.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -layout: archive -title: "Publications" -permalink: /publications/ -author_profile: true ---- - -{% if site.author.googlescholar %} -
You can also find my articles on my Google Scholar profile.
-{% endif %} - -{% include base_path %} - -{% for post in site.publications reversed %} - {% include archive-single.html %} -{% endfor %} diff --git a/_publications/2009-10-01-paper-title-number-1.md b/_publications/2009-10-01-paper-title-number-1.md index 6e4579d306482..37cfe9a4700e6 100644 --- a/_publications/2009-10-01-paper-title-number-1.md +++ b/_publications/2009-10-01-paper-title-number-1.md @@ -1,6 +1,7 @@ --- title: "Paper Title Number 1" collection: publications +category: manuscripts 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 diff --git a/_publications/2010-10-01-paper-title-number-2.md b/_publications/2010-10-01-paper-title-number-2.md index 804ac2138d2d9..00637099397bb 100644 --- a/_publications/2010-10-01-paper-title-number-2.md +++ b/_publications/2010-10-01-paper-title-number-2.md @@ -1,6 +1,7 @@ --- title: "Paper Title Number 2" collection: publications +category: manuscripts 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 diff --git a/_publications/2015-10-01-paper-title-number-3.md b/_publications/2015-10-01-paper-title-number-3.md index e4cb08ac0597b..42bf1d4ae7ce8 100644 --- a/_publications/2015-10-01-paper-title-number-3.md +++ b/_publications/2015-10-01-paper-title-number-3.md @@ -1,6 +1,7 @@ --- title: "Paper Title Number 3" collection: publications +category: manuscripts 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 diff --git a/_publications/2024-02-17-paper-title-number-4.md b/_publications/2024-02-17-paper-title-number-4.md index 90c20f5c65238..5fd722cc8ae4d 100644 --- a/_publications/2024-02-17-paper-title-number-4.md +++ b/_publications/2024-02-17-paper-title-number-4.md @@ -1,6 +1,7 @@ --- title: "Paper Title Number 4" collection: publications +category: conferences permalink: /publication/2024-02-17-paper-title-number-4 excerpt: 'This paper is about fixing template issue #693.' date: 2024-02-17