Skip to content

Editing the hub website

Hugo Gruson edited this page Aug 19, 2022 · 3 revisions

The hub website is an rmarkdown website hosted at https://www.github.com/covid19-forecast-hub-europe/covid19-forecast-hub-europe-website.

In rmarkdown websites, each page is a Rmarkdown (.Rmd) document and the website navigation bar and global parameters are specified in _site.yml.

Once you commit and push a change in a .Rmd document or _site.yml, the changes will be automatically deployed after a couple of minutes.

Editing a page

To edit a specific page, simply edit the related .Rmd file. For example, if you want to modify the "Background" page, edit background.Rmd.

Similarly, if you want to edit the disclaimer on the "Visualisation" page, edit visualisation.Rmd, and more specifically, the text contained in between <p id="limitation">...</p>.

Removing a page

To unlist a page from the navigation bar, remove it from the navbar field in _site.yml, as demonstrated below (example to remove the "Visualisation" page):

image

When unlisted, the page will typically not be visited because it's not linked from anywhere. However, users with direct links (and in some cases, search engines) can still access it directly. To remove the page entirely, remove the related .Rmd file (e.g., visualisation.Rmd in the case of the "Visualisation" page.)

Editing the reports

The forecast hub framework has an additional unusual complication: reports are generated from .Rmd location in the current GitHub repository, within the code/reports/ folder. Reports are automatically rendered:

Git flow

Whenever you try to edit the website, whether to modify or remove a page, or modify the reports, please do so by submitting a Pull Request and wait until all checks have passed (green check mark) to merge it. We have built in safeguards to ensure that you don't push changes in one place which break things in another place.