From 0b066ad93b790217afa0d897dd1f91e6c1baab8f Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Sat, 10 Jun 2023 16:28:41 +0200
Subject: [PATCH] Also add the number of citations to the main paper on the
 publications page

---
 query.py            | 4 +++-
 templates/pubs.html | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/query.py b/query.py
index e23da1e..3b54b98 100644
--- a/query.py
+++ b/query.py
@@ -12,7 +12,8 @@ total_citations = 0
 for paper in paper_list:
     if paper.bibcode == "2023arXiv230513380S":
         to_remove = paper
-
+        citations_release = paper.citation_count
+        
     if len(paper.title) == 1:
         paper.title = paper.title[0]
     paper.bibstem = paper.bibstem[0]
@@ -27,6 +28,7 @@ paper_list.remove(to_remove)
 # Create a dictionary of cards
 my_list = dict({"num_papers": query_data.num_found - 1,
                 "total_citations": total_citations,
+                "citations_release": citations_release,
                 "cards": paper_list})
 
 # Silence the yaml object naming
diff --git a/templates/pubs.html b/templates/pubs.html
index d1d9ffb..de7fbeb 100644
--- a/templates/pubs.html
+++ b/templates/pubs.html
@@ -16,11 +16,11 @@
 
 	<h4><a href="https://ui.adsabs.harvard.edu/abs/2023arXiv230513380S/abstract">SWIFT: A modern highly-parallel gravity and smoothed particle hydrodynamics
 	    solver for astrophysical and cosmological applications</a> </h4>
-	<p>&emsp;  Schaller M. et al., <i>arXiv</i>, 2023, 2305.13380
+	<p>&emsp;  Schaller M. et al., <i>arXiv</i>, 2023, 2305.13380 &emsp;&emsp;(citations: {{ citations_release }})
 
 	<h4><a href="https://ui.adsabs.harvard.edu/abs/2016pasc.conf....2S/abstract">SWIFT: Using Task-Based Parallelism, Fully Asynchronous Communication, and Graph Partition-Based Domain
 	Decomposition for Strong Scaling on more than 100,000 Cores </a> </h4>
-	<p>&emsp;  Schaller M. et al., <i>PASC</i>, 2016, vol. 1
+	<p>&emsp;  Schaller M. et al., <i>PASC</i>, 2016, vol. 1 
 
       </div>
 
-- 
GitLab