Making websites with R
Spring 2022, Welcome!
Matthew J. C. Crump
Last compiled 04/13/22
Roadmap
- R markdown websites
- Distill websites
- blogdown websites
Basic Steps
- Make a new R studio project
- Choose simple R markdown website
- Click build website from build tab
- Look at your basic website!
_site.yml
Edit the yml file to change the site navigation bar
name: "my-website"
navbar:
title: "My Website"
left:
- text: "Home"
href: index.html
- text: "About"
href: about.html
Editing pages
index.Rmd
is the home page, edit it by changing the text in the .Rmd
about.Rmd
is a sample about page.
- Make new .Rmds, add them to the navbar in `_site.yml’
- Rebuild pages
Hosting
- Your website could be hosted from any server
- upload to your github repo, and host it through github pages
More complicated websites
There are several R markdown website generators that offer more bells and whistles.
They have a similar general structure to the basic R website:
- a yml file typically controls navigation bar content
- Rmds are used to write content for individual pages
- css is used to style everything
- some sites are set up for easy blogging