Skip to content
Snippets Groups Projects
Commit 732e8f9e authored by Rémi Lemaire-Patin's avatar Rémi Lemaire-Patin
Browse files

Added option to remove changelog sidebar toc

parent 3e522638
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@
##' library(ncdf4)
##' @export
##'
##' @importFrom stringr str_detect str_subset str_remove str_trim str_split
##' @importFrom stringr str_detect str_subset str_remove str_trim str_split
##' @importFrom lubridate parse_date_time
format_changelog <- function(filename) {
......
......@@ -265,6 +265,8 @@ summary_pdf <- function(x, filename, template, list_var, add_study_site = FALSE,
##' @param input.file a \code{character}, path to changelog
##' @param out.file a \code{character}, path to output file
##' @param out.dir (default \code{'./'}), a \code{character}, output directory
##' @param sidebar.toc (default \code{FALSE}) whether a sidebar toc should be generated
##' or not
##' @return NULL
##'
##' @family summary
......@@ -278,13 +280,18 @@ summary_pdf <- function(x, filename, template, list_var, add_study_site = FALSE,
summary_changelog <- function(input.file,
out.file = "./MuSICA_changelog.html",
out.dir = "./") {
out.dir = "./",
sidebar.toc = FALSE) {
parsed_changelog <- format_changelog(input.file)
if (requireNamespace("rmarkdown") & requireNamespace("DT")) {
file.md <- paste0(system.file(package = "musica.tools"),
"/rmarkdown/",
ifelse(sidebar.toc,
"template_changelog.Rmd",
"template_changelog_notoc.Rmd"))
rmarkdown::render(
input = paste0(system.file(package = "musica.tools"),
"/rmarkdown/template_changelog.Rmd"),
input = file.md,
output_file = out.file,
output_dir = out.dir,
encoding = 'UTF-8'
......
---
title: "&#32;"
output:
html_document
date: "`r Sys.Date()`"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, error = FALSE, warning = FALSE)
```
# Version 3
```{r, results = 'asis'}
DT::datatable(parsed_changelog$v3, filter = 'top')
```
# Version 2
```{r, results = 'asis'}
DT::datatable(parsed_changelog$v2, filter = 'top')
```
# Authors
```{r, results = 'asis'}
DT::datatable(parsed_changelog$authors, filter = 'top')
```
......@@ -13,6 +13,7 @@ vignette: >
### 0.1.3
* Added changelog parser and summary
* Added option to remove changelog sidebar toc
### 0.1.2
* in the shiny app, for heatmap and daily heatmap, facet default to models if possible
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment