These pages are in R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When in RStudio you click the Knit button and a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.
For more information - contact captif@nzta.govt.nz
Assuming R and RStudio are already installed and R Markdown is being used for files.
Steps
And your new website should be up and running at
https://Github_user_name.github.io/Github_repo_name/_site/
ie for captif-nz https://captif-nz.github.io/LTPPNZ/_site/
And remember you need that redirect index.html in github repo
and a .nojekyll file made (with nothing actually in it)
Note.
- “Kniting” HTML isn’t the same as “Building” a website.
- Knitting includes pictures in the HTML, making it slow to load
- Building strips out the pictures and links to them - making it fast
You will need a redirect file called index.html that gets loaded directly to the Githun master repo. This just makes the link to the _site folder the RStudio creates you website in.
<html>
<head>
<title>Redirecting to LTPP Data site
</title>
<meta http-equiv="refresh" content="1; URL=https://captif-nz.github.io/LTPPNZ/_site">
<meta name="keywords" content="automatic redirection">
</head>
You will also need a file called index.RMD file to act as a home page (It can contain anything) when you build the website in Rstudio - if you use the _Site.yml file format on the next page. Unfortunately if you knit this file you will over write the index.html file for the repo-master folder from the previous page. And it must be called index as the github looks for index in the folder - tried calling it something else and wasn’t successful.
##_Site.yml file
You will need create a text file in R Studio called “_Site.yml” in the R Project that looks a bit like this below. It is the structure of your site. That index file is not the same as the one mentioned above as a redirect - this a RMD file called index that is built for the webiste as its home page
name: "LTPP-website"
navbar:
title: "LTPP Website"
left:
- text: "Home"
href: index.html
- text: "About"
href: about.html
- text: "LTTP Summary"
href: LTTP-Summary.html
- text: "Rutting Summary"
href: Rutting-Summary.html
- text: "Roughness Summary"
href: RoughnessSummary.html
- text: "Texture Summary"
href: TextureSummary.html
- text: "Ratings Summary"
href: Ratings.html
- text: "Table Summary"
href: Table-Summary.html