Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafnuss committed Jan 16, 2025
1 parent 6615322 commit e5c146e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions R/build-home-authors.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions inst/BS3/templates/content-citation-authors.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ <h1 id="citation">{{#translate}}{{citation}}{{/translate}}</h1>
</div>
</div>

{{#citation_header}}

{{#citations}}
{{{html}}}
Expand Down

0 comments on commit e5c146e

Please sign in to comment.