From 2add66b669db74efcebf553e5a540754dd8b4be3 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Tue, 20 Jun 2023 13:35:08 +0200 Subject: [PATCH 1/2] Add support for a subtitle field placed directly under title (#482) --- DESCRIPTION | 2 +- NEWS.md | 1 + inst/rmarkdown/templates/distill_article/resources/default.html | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index c69c185a..8b2bf117 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: distill Title: 'R Markdown' Format for Scientific and Technical Writing -Version: 1.5.3 +Version: 1.5.4 Authors@R: c( person("Christophe", "Dervieux", , "cderv@posit.co", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-4474-2498")), diff --git a/NEWS.md b/NEWS.md index 21010b50..681b0ee4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,7 @@ - Fix an issue with line numbering on code chunks when `highlight-downlit: false` by tweaking Pandoc's default CSS rules (thanks, \@SES-CE, #473). - Internally use `format()` instead of `as.character()` with Dates to account for argument \`format=\` deprecation in R 4.3.0 (thanks, \\\@mbojan, #488). +- Add a \`subtitle\` variable in HTML template placed between title and categories (thanks, \\\@dicook, #480). # distill 1.5 (CRAN) diff --git a/inst/rmarkdown/templates/distill_article/resources/default.html b/inst/rmarkdown/templates/distill_article/resources/default.html index 92b55f8b..0c6c0a43 100644 --- a/inst/rmarkdown/templates/distill_article/resources/default.html +++ b/inst/rmarkdown/templates/distill_article/resources/default.html @@ -75,6 +75,7 @@

$pagetitle$

+$if(subtitle)$

$subtitle$

$endif$ $if(categories)$
From 66ead96effaa6899d003a9c7dd2743cbdfb25ed5 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Mon, 28 Aug 2023 16:53:50 +0200 Subject: [PATCH 2/2] Update NEWS.md --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 681b0ee4..b27d1498 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ - Fix an issue with line numbering on code chunks when `highlight-downlit: false` by tweaking Pandoc's default CSS rules (thanks, \@SES-CE, #473). - Internally use `format()` instead of `as.character()` with Dates to account for argument \`format=\` deprecation in R 4.3.0 (thanks, \\\@mbojan, #488). -- Add a \`subtitle\` variable in HTML template placed between title and categories (thanks, \\\@dicook, #480). +- Add a `subtitle` variable in HTML template placed between title and categories (thanks, \\\@dicook, #480). # distill 1.5 (CRAN)