Skip to content

Commit

Permalink
Fixed hard-coded bib files in templates (alshedivat#1373)
Browse files Browse the repository at this point in the history
The bibliography filename `papers.bib` is hard coded in templates, and
the equivalent setting in `_config.yml` is not used anywhere. So
changing the bib filename in `_config.yml` won't have any effects.

This PR replaces hard-coded filenames with the value from `_config.yml`.
  • Loading branch information
Lodour authored and wangmagg committed May 14, 2024
1 parent 4f139a7 commit 0702444
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _includes/selected_papers.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

<div class="publications">
{% bibliography -f papers -q @*[selected=true]* %}
{% bibliography -f {{ site.scholar.bibliography }} -q @*[selected=true]* %}
</div>
18 changes: 18 additions & 0 deletions _pages/publications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
layout: page
permalink: /publications/
title: publications
description: publications by categories in reversed chronological order. generated by jekyll-scholar.
years: [1967, 1956, 1950, 1935, 1905]
nav: true
nav_order: 1
---
<!-- _pages/publications.md -->
<div class="publications">

{%- for y in page.years %}
<h2 class="year">{{y}}</h2>
{% bibliography -f {{ site.scholar.bibliography }} -q @*[year={{y}}]* %}
{% endfor %}

</div>

0 comments on commit 0702444

Please sign in to comment.