Closed sdtaylor closed 7 years ago
Looks great! Thanks Shawn.
The good news for automation is that the approach you ended up taking integrates seamlessly with our current approach. Your commit Looks great! Thanks Shawn.
The good news for automation is that the approach you ended up taking integrates seamlessly with our current approach. Your commit f0c26f99880016c1a8a89e41616e38b0b3d0e5db can be applied directly to current repo and then we just change .
to docs
in _site.yml
and the call to rmarkdown::render()
in PortalForecasts.R
to rmarkdown::render_site()
. If we want to keep things a little cleaner we could put all of the website files in a website
or site
folder.
I can cherry pick your commit over to the main repo if you'd like or you can submit a PR.
I'll make a PR. Should everything in docs
be commited too?
Yes, but in a separate commit just like you did in your fork.
All this is looking good
I've got a working concept of the website here
https://sdtaylor.github.io/portalPredictions
I was trying to use the R package blogdown, which looked very promising. But I ended up spending a lot of time reading about the Hugo static website engine (the backend for blogdown), which was too much work. So I used the just the rmarkdown package and this tutorial to make the above website. The workflow can definitely be improved, but it went like this.
-Branch the current master to a gh-pages branch -Create the config file _site.yml -Create the 4 pages (index.Rmd, report.Rmd, profiles.md, about.Rmd) with Rmarkdown or plain markdown. -Run
rmarkdown::render_site()
. This renders all the html pages. -commit and push everything to github and set gh-pages as the repo website.The old forecast page that's been in the repo for a while is index.Rmd. This serves as the landing page and the Current Forecast page.
By default
render_site()
pushes all site content into the folder_site/
. But I'm not sure if github will look in there for html files. So I set the render output directory to just "." in_site.yml
. All theportalPredictions
code needs to be in the same folder to run the rmarkdown scripts, so I couldn't yet do this in theportalPredictionsWebsite
repo and have only the website html in there. One option for this is to letrender_site()
write everything to_site/
which is then copied to the website repo and pushed. Or eventually put everything inportalPredictions
into it's own package, which ( I think) would let the rmarkdown scripts run directly in the website repo.Todo: -Decide on a final design for the website to present for the anniversary. -write content for the site. -Work out the kinks above so things can be automated.