Skip to content

Commit

Permalink
updated how featured articles are handled
Browse files Browse the repository at this point in the history
  • Loading branch information
jhelvy committed Dec 10, 2023
1 parent c9f5989 commit e5e1bdf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion R/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,13 @@ make_media_list <- function() {
return(paste(temp$post, collapse = "\n"))
}

make_pub_list <- function(pubs, category) {
make_pub_list <- function(pubs, category, featured = FALSE) {
x <- pubs[which(pubs$category == category),]
if (featured) {
x <- x[which(x$featured),]
} else {
x <- x[which(!x$featured),]
}
pub_list <- lapply(split(x, 1:nrow(x)), make_pub)
return(paste(unlist(pub_list), collapse = ""))
}
Expand Down
2 changes: 1 addition & 1 deletion research.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pubs <- get_pubs()

<aside>*indicates student advised by Helveston</aside>

`r make_pub_list(pubs, "featured")`
`r make_pub_list(pubs, "peer_reviewed", featured = TRUE)`

## Other Peer-Reviewed Publications

Expand Down

0 comments on commit e5e1bdf

Please sign in to comment.