nmfs-opensci / pkgdownTemplate

Clone this repo to create a NMFS branded pkgdown website
https://nmfs-opensci.github.io/pkgdownTemplate/
Other
8 stars 4 forks source link

pkgdown templates as R packages rather than forked repositories #1

Open kellijohnson-NOAA opened 3 years ago

kellijohnson-NOAA commented 3 years ago

@HaleyOleynik-NOAA after talking today I found this resource on r-lib regarding how to create custom pkgdown templates under the header "Sharing pkgdown styles: template packages" where it says 

To share a pkgdown style across several packages, the best workflow is to create… a package!

I didn't read the instructions in detail, but maybe I could help on converting the current template to a package :)

haleyoleynik commented 3 years ago

This is great! Exactly what we were talking about, I'll take a look at it.

kellijohnson-NOAA commented 3 years ago

I also found GitHub action to use pkgdown for dplyr to make sure that websites are automatically updated.

eeholmes commented 3 years ago

I use a GitHub action on my packages to make sure the pkgdown website is updated each time I change something. Mine is a little different because my workflow also run roxygen to re-run the man files.

https://github.com/nwfsc-math-bio/VRData/blob/master/.github/workflows/run-pkgdown.yaml

kellijohnson-NOAA commented 3 years ago

Brilliant @eeholmes. @k-doering-NOAA and I were just chatting about the documentation issue as well for other repos (ss3sim/ss3sim#323 and r4ss/r4ss#516).

eeholmes commented 3 years ago

I added a GitHub Action to build the pkgdown site automatically whenever changes are pushed to the repo. It also remakes the Readme.md file from the Readme.Rmd file.

BTW the point of the Readme.Rmd is that it allows the site's disclaimer, footer and license to stay synced to the FIT resource folder. However the R package option to create a pkgdown style that stays unified across all packages is a better approach.

eeholmes commented 3 years ago

I also added some more details to the Readme.Rmd file. Note make changes to the Readme.Rmd file not the Readme.md file. The latter will get wiped out everytime the build-pkgdown-site GitHub Action runs.