This repository has been superseeded by https://github.com/WarwickRUG/WarwickRUG.github.io Any new development to WRUG's website will take place there, and this one will be archived.
Warwick R User Group website, created using Distill
.
Some icons obtained from Reshot.
- Clone this repo:
git clone [email protected]:WarwickRUG/wrug_website.git
- Install
renv
if not already installed (instructions here). - Run
renv::restore()
to restore the state of your project fromrenv.lock
.
- Install packages as usual.
- Run
renv::snapshot()
to updaterenv.lock
. - Create a commit with
renv.lock
changes and push it to the repo.
Add new blog posts
- Create a new blog post by running
distill::create_post("<date_your title>", draft = TRUE)
where<date_your title>
will be replaced with an actual date in yyy-mm-dd format and any meaningful title which will be the blog post's url. - Edit content as a regular Rmd file (refer to https://rstudio.github.io/distill/blog.html#creating-a-post for more information)
- Once you are happy with the results:
- change
draft = TRUE
todraft = FALSE
(or just comment the line) so the post can be displayed. - knit the Rmd file:
knitr::knit(<your filename>)
or use RStudio's interface.
Edit an existing blog post
- Edit the desired post within `_posts``folder
- Save changes
- Knit the file
- run
rmarkdown::render_site()
to render a local copy of the website. (this will only deploy any rendered site) - website deployment will depend on what we decide in this issue
If facing issues installing packages from Windows, run this command. (more info in renv
documentation and in this discussion)
Sys.setenv(RENV_DOWNLOAD_METHOD = "libcurl")
Make sure that you knit your content after editing your .Rmd
file, otherwise, it will not show in the new site when rendering and deploying the site. The advantage of this approach is that older blog posts don't break if you update your R packages or dependencies and don't want to update the posts. If you don't fancy re-knitting every time you make a change, then you can write an ordinary markdown post
Thanks goes to these wonderful people (emoji key):
Carlos Cámara 💻 📆 |
Heather Turner 💬 |
David Selby 💬 🖋 |
Aditi Shenvi 💻 |
James Tripp 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!