File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ build_citation_authors <- function(pkg = ".") {
1010 authors <- data_authors(pkg )
1111 data <- list (
1212 pagetitle = tr_(" Authors and Citation" ),
13+ citation_header = data_citations_header(pkg ),
1314 citations = data_citations(pkg ),
1415 authors = unname(authors $ all ),
1516 inst = authors $ inst ,
@@ -245,6 +246,17 @@ data_home_sidebar_citation <- function(pkg = ".") {
245246 )
246247}
247248
249+ data_citations_header <- function (pkg = " ." ) {
250+ pkg <- as_pkgdown(pkg )
251+
252+ print(" heoo" )
253+ if (has_citation(pkg $ src_path )) {
254+ provided_citation <- read_citation(pkg $ src_path )
255+ return (attr(provided_citation , " mheader" ))
256+ }
257+ NULL
258+ }
259+
248260data_citations <- function (pkg = " ." ) {
249261 pkg <- as_pkgdown(pkg )
250262
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ <h1 id="citation">{{#translate}}{{citation}}{{/translate}}</h1>
2323 </ div >
2424 </ div >
2525
26+ {{#citation_header}}
2627
2728 {{#citations}}
2829 {{{html}}}
You can’t perform that action at this time.
0 commit comments