Connecting Hugo and Excel for Your List of Publications

On my website I list my publications. Hugo Academic has a feature for this, but I’m not too keen on that feature. It is quite time intensive to update your publications that way, and I like being lazy. I keep track of my publications in an Excel file. Each time I have another one, I only need to add a line to my spreadsheet.

I already had this spreadsheet before I had my website under Hugo Academic but now integrated my publications on my site. People asked me how I did this, so here’s a tutorial. For this, I use a stripped-down version of my publication list.

The results of this code is what you can see below. A few remarks:

  • Put the code wherever you want it on your page. I made a specific page for it, but if you prefer you can also integrate it on another page.

  • I’m sure the code can be made prettier using tidyverse, but this works too.

  • For this example, I have the Excel file in de same folder as the Rmd file. This is done on purpose, such that you can download that file. Normally, you’d want the file a few levels higher, such that the file isn’t published online. By changing the call in read.xls() to e.g. ‘file = “../../publications.xlsx”’, you can achieve this.

  • I’ve used an Excel file. If you want, you can also keep track of your publications in some Open Office format, CSV, or even SPSS. Basically, anything that R can import (which is pretty much everything) can be used.

  • Hugo automatically updates the website once a file gets updated. If you add a publication, the Excel file gets updated, but the Rmd-file doesn’t, so Hugo doesn’t update your compiled publication list. You have to manually tell Hugo to do this, by ‘touching’ the Rmd-file, or emptying the /public folder.

  • If you want, you can add tweaks. For instance, I’ve added a column ‘link’ in the Excel spreadsheet for linking to papers that aren’t open access but which I can share publicly through my university repository; and I included the Altmetric plugin.

  • If you have any comments or suggestions, please let me know.

The code and the output:

my_data <- read.xlsx(file = "publications.xlsx", sheetIndex = 1, 
                     header = TRUE, stringsAsFactors = FALSE)

my_data$Row <- row.names(my_data)
my_data <- my_data[order(my_data$Year, as.numeric(my_data$Row), 
                         decreasing = c(TRUE, TRUE)), ]
years <- sort(unique(my_data$Year), decreasing = TRUE)

for(year in years){
  cat(paste("\n","## ",year,sep=""))
  thisyear <- my_data[my_data$Year == year,]
  if(dim(thisyear)[1] > 0){
    for(i in 1:(dim(thisyear)[1])){
      cat(paste("\n<li>",sep = ""))
      cat(paste(thisyear$Author[i], " (",year,"). ",thisyear$Title[i], ". ", sep=""))
        cat(paste("<i>",thisyear$Journal[i],"</i>. ",sep="")) 
        cat(" <a href=\"",thisyear$DOI[i],"\" 


  • Willems, S. J. W., Albers, C. J., Smeets, I. (2020). Variability in the interpretation of probability phrases used in Dutch news articles - a risk for miscommuncation. JCOM - Journal of Science Communication. 19(02): A03 [DOI]
  • Cheplygina, V., Hermans, F., Albers, C. J., Bielczyk, N., Smeets, I. (2020). Ten simple rules for getting started on Twitter as a scientist. PLoS Computational Biology. 16(2): e1007513 [DOI]


  • Bhushan, N., Mohnert, F., Sloot, D., Jans, L., Albers, C., Steg, E. M. (2019). Using a Gaussian Graphical Model to Explore Relationships Between Items and Variables in Environmental Psychology Research. Frontiers in Psychology. 10, 1050 [DOI]
  • Albers, C. J. (2019). The problem with unadjusted multiple and sequential statistical testing. Nature Communications. 10(1), 1921 [DOI]
  • Namazkhan, M., Albers, C. J., Steg, E. M. (2019). The role of environmental values, socio-demographics and building characteristics in setting room temperatures in winter. Energy. 171, 1183-1192 [DOI]
  • Venhuizen, G. J., Hut, R., Albers, C. J., Stoof, C. R., Smeets, I. (2019). Flooded by jargon: how the interpretation of water-related terms differ between hydrology experts and the general audience. Hydrology and Earth System Sciences. 23(1): 393-403 [DOI]
  • Ernst, A. F., Timmerman, M. E., Jeronimus, B. F., Albers, C. J. (2019). Insight into individual differences in emotion dynamics with clustering. Assessment. Published online ahead of print [DOI]
  • Voncken, L., Albers, C. J., Timmerman, M. E. (2019). Improving confidence intervals for normed test scores: Include uncertainty due to sampling variability. Behavior Research Methods. 51(2), 826-839 [DOI]
Casper Albers
Statistician • Researcher • Columnist
Professor in Applied Statistics and Data Visualisation

My research interests include applied statistics in general, modelling of psychological longitudinal data in particular, statistics communication and data visualisation matter.

comments powered by Disqus