Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Joshua Lambert <[email protected]>
  • Loading branch information
jamesmbaazam and joshwlambert authored Nov 15, 2024
1 parent a9eddc5 commit b15baae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website.qmd
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
### Package website modes

Epiverse-TRACE packages use the [`{pkgdown}` package](https://pkgdown.r-lib.org/) to generate websites. `{pkgdown}` provides [development modes](https://pkgdown.r-lib.org/reference/build_site.html#development-mode) (in the [`_pkgdown.yml` file](https://pkgdown.r-lib.org/articles/customise.html)) to generate different sites for the development and released versions of your package.
Epiverse-TRACE packages use the [`{pkgdown}` package](https://pkgdown.r-lib.org/) to generate websites. `{pkgdown}` provides [development modes](https://pkgdown.r-lib.org/reference/build_site.html#development-mode) (specified by a package's [`_pkgdown.yml` file](https://pkgdown.r-lib.org/articles/customise.html)) to generate different sites for the development and released versions of your package.

When the package is not yet on CRAN, we use the `unreleased` development mode. In this case, we use a visual element to highlight the package development version in red. An example is the [website](https://epiverse-trace.github.io/superspreading/) for `{superspreading}` and its associated `_pkgdown` [configuration](https://github.com/epiverse-trace/superspreading/blob/main/_pkgdown.yml#L12-L13).

After the package is accepted on CRAN, we switch to `auto` mode, which provides two versions of the website: `release` and `devel`. Here, an example is the `{cfr}`package [website](https://epiverse-trace.github.io/cfr/), which is configured [here](https://github.com/epiverse-trace/cfr/blob/main/_pkgdown.yml#L5-L6). We use this configuration for the CRAN packages because we expect most users to install the package from CRAN and so we direct them to the CRAN site associate with the installed release. The additional `devel` option here allows users to manually switch to it if they installed the development version from GitHub.
After the package is accepted on CRAN, we switch to `auto` mode, which provides two versions of the website: `release` and `devel`. Here, an example is the `{cfr}`package [website](https://epiverse-trace.github.io/cfr/), which is configured [here](https://github.com/epiverse-trace/cfr/blob/main/_pkgdown.yml#L5-L6). We use this configuration for the CRAN packages because we expect most users to install the package from CRAN and so we direct them to the CRAN site associated with the current release. The additional `devel` option here allows users to manually switch to it if they installed the development version from GitHub.

We also provide text in package READMEs to direct users to the appropriate site. Typical text for the README might be: "The package has two websites: one for `[the stable release version on CRAN](URL)`, and another for `[the version in development](URL)`", where `URL` is the link to the respective site. See an example in the [`{EpiNow2}`] package [README](https://github.com/epiforecasts/EpiNow2/blob/main/README.Rmd#L125-L127).

0 comments on commit b15baae

Please sign in to comment.