This is code and text behind the Learn BaSTA site. It is based on Hadley Wickham's site for his Advanced R Programming book.
The site is built using Jekyll, with a custom plugin to render .rmd
files with
knitr and pandoc. To create the site, you need:
- jekyll and s3_websiter gems:
gem install jekyll s3_website
- pandoc
- knitr:
install.packages("knitr")
- bookdown: 'install_github("hadley/bookdown")'
- Ruby - you probably already have this installed.
Add the following to your .gitignore
file.
Temp.html
Temp.Rmd
*.Rproj
_site
##Copying and deploying this site (e.g. to create a similar one)
I assume you are using a Mac with OSX.
- Create a new repository,
XXX
, with a.gitignore
file - Create a new branch of
XXX
calledgh-pages
(i.e. have two branches named "master
" and "gh-pages
") - Use the Github app to clone
XXX
to your computer. - Place the contents of
learn-basta
in theXXX
directory master branch. - Open Terminal, navigate to your
XXX
directory, run 'jekyll serve
' and watch as directory "_site
" is created. It may take a few moments. - Stop the jekyll server (ctrl-c)
- Move "
_site
" to the desktop. - In GitGub app, switch to the
gh-pages
branch. - Move the contents of "
_site
" to theXXX
directory of thegh-pages
branch. - Commit and synchronise to GitGub.
- Your site should be visible at
http://username.github.io/XXX