---
title: "`r params$pkg_name`" 
output:
  html_document:
    self_contained: TRUE
    theme: flatly
    includes:
      in_header: header.html
      after_body: footer.html
params:
   reporters: params$reporters
   pkg_name: params$pkg_name
---

<style>
    body .main-container {
        max-width: 80%;
    }
</style>

```{r setup, include=FALSE}
knitr::opts_chunk$set(
    echo = FALSE
    , warning=FALSE
    , out.width='100%'
)
pkgnet:::silence_logger()
```

```{r warning=FALSE}
reportTabs <- lapply(params$reporters, function(reporter) {
  report_env <- list2env(list(reporter = reporter))
  knitr::knit_child(
    reporter$report_markdown_path
    , envir = report_env
  )
})

```

```{r results="asis"}
cat(paste0("# {.tabset} \n", paste(reportTabs, collapse = '\n')))
```

#

```{r results="asis"}
cat(sprintf("Report built with pkgnet v%s", packageVersion('pkgnet')))
```

```{r echo = FALSE}
pkgnet:::unsilence_logger()
```
