Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ jobs:
extra-packages: any::pkgdown, local::.
needs: website

- name: Generate pkgdown index with version note
run: |
# Insert version note after the badges section (after "<!-- badges: end -->")
sed '/<!-- badges: end -->/r pkgdown/_index_header.md' README.md > pkgdown/index.md

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}
Expand Down
25 changes: 0 additions & 25 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,6 @@ library(magrittr)
library(data.table)
library(ggplot2)
library(knitr)

## code to determine version inspired by [pkgdown:::dev_mode_auto()]
version <- packageVersion("scoringutils")
devel <- length(unclass(package_version(version))[[1]]) > 3
```

```{r note_dev, results = 'asis', echo = FALSE}
if (devel) {
cat(
"***Note***: ",
"[*This documentation*](https://epiforecasts.io/scoringutils/dev/) *refers to the development version of `scoringutils`.* ",
"*You can also view the* [*documentation of the stable version*]",
"(https://epiforecasts.io/scoringutils/).",
sep = ""
)
} else {
cat(
"***Note***: ",
"[*This documentation*](https://epiforecasts.io/scoringutils/) *refers to the stable version of `scoringutils`.* ",
"*You can also view the* [*documentation of the development version*]",
"(https://epiforecasts.io/scoringutils/dev/).",
sep = ""
)
}
cat("\n\n")
```

## Utilities for Scoring and Assessing Predictions
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ version](https://img.shields.io/github/r-package/v/epiforecasts/scoringutils)
[![metacrandownloads](http://cranlogs.r-pkg.org/badges/grand-total/scoringutils)](https://cran.r-project.org/package=scoringutils)
<!-- badges: end -->

***Note***: [*This
documentation*](https://epiforecasts.io/scoringutils/dev/) *refers to
the development version of `scoringutils`.* *You can also view the*
[*documentation of the stable
version*](https://epiforecasts.io/scoringutils/).

## Utilities for Scoring and Assessing Predictions

The `scoringutils` package facilitates the process of evaluating
Expand Down Expand Up @@ -260,7 +254,9 @@ Health.
## Contributors

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->

<!-- prettier-ignore-start -->

<!-- markdownlint-disable -->

All contributions to this project are gratefully acknowledged using the
Expand Down Expand Up @@ -306,5 +302,7 @@ specification. Contributions of any kind are welcome!
<a href="https://github.com/epiforecasts/scoringutils/issues?q=is%3Aissue+commenter%3ATimTaylor">TimTaylor</a>

<!-- markdownlint-enable -->

<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->
12 changes: 12 additions & 0 deletions pkgdown/_index_header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div class="pkgdown-devel">

***Note***: [*This documentation*](https://epiforecasts.io/scoringutils/dev/) *refers to the development version of `scoringutils`.* *You can also view the* [*documentation of the stable version*](https://epiforecasts.io/scoringutils/).

</div>

<div class="pkgdown-release">

***Note***: [*This documentation*](https://epiforecasts.io/scoringutils/) *refers to the stable version of `scoringutils`.* *You can also view the* [*documentation of the development version*](https://epiforecasts.io/scoringutils/dev/).

</div>

Loading