diff --git a/R/build-home-authors.R b/R/build-home-authors.R index 8a7100e52..363e8c67a 100644 --- a/R/build-home-authors.R +++ b/R/build-home-authors.R @@ -10,6 +10,7 @@ build_citation_authors <- function(pkg = ".") { authors <- data_authors(pkg) data <- list( pagetitle = tr_("Authors and Citation"), + citation_header = data_citations_header(pkg), citations = data_citations(pkg), authors = unname(authors$all), inst = authors$inst, @@ -245,6 +246,17 @@ data_home_sidebar_citation <- function(pkg = ".") { ) } +data_citations_header <- function(pkg = ".") { + pkg <- as_pkgdown(pkg) + + print("heoo") + if (has_citation(pkg$src_path)) { + provided_citation <- read_citation(pkg$src_path) + return(attr(provided_citation, "mheader")) + } + NULL +} + data_citations <- function(pkg = ".") { pkg <- as_pkgdown(pkg) diff --git a/inst/BS3/templates/content-citation-authors.html b/inst/BS3/templates/content-citation-authors.html index 2ba7cf2c8..6cca9cb59 100644 --- a/inst/BS3/templates/content-citation-authors.html +++ b/inst/BS3/templates/content-citation-authors.html @@ -23,6 +23,7 @@