-
Notifications
You must be signed in to change notification settings - Fork 50
Compiling the website
Zhian N. Kamvar edited this page Mar 4, 2015
·
2 revisions
In order to compile the website, a few things are needed:
- The most recent R version
- The Rstudio IDE
- The Rmarkdown package
- The knitcitations package
- This script to run the content of the website:
install.packages(c("poppr", "mmod", "genetics", "magrittr"))
- perl
- The
Roman
perl module
Once all things are installed, you can edit the *.Rmd
files and then run:
make all
If everything is installed correctly, the website should compile perfectly and you can view it by opening index.html
.
If you want to add a new page to the website, there are a couple of steps needed:
- Add your page in Rmarkdown format (
*.Rmd
). - Add the basename of the new page to
toc.txt
in the appropriate place (preface, body, or appendix). - Add the proper HTML list tag to
include/before_body.html
.
For example, if you wanted to add a new chapter called "Mantel Tests" after the Population Structure chapter, you would do the following:
- Name the file
Mantel_Test.Rmd
- In
toc.txt
, add the name of the file (Note, Arrows added for emphasis. Do not add them in like this):
prefix:
start:i
Preface
prefix:
start:1
Introduction
Getting_ready_to_use_R
Data_Preparation
First_Steps
Population_Hierarchies
Locus_Stats
Genotypic_EvenRichDiv
Linkage_disequilibrium
Pop_Structure
>>> Mantel_Test <<<
AMOVA
DAPC
prefix:A
start:1
Data_sets
Function_Glossary
Intro_to_R
- Modify
include/before_body.html
and runmake all
:
<!-- Some stuff up here -->
<li><a href="Linkage_disequilibrium.html">8. Linkage disequilibrium</a></li>
<li><a href="Pop_Structure.html">9. Population structure</a></li>
<!-- HERE >--> <li><a href="Mantel_Test.html">9. Mantel Tests</a></li> <!-- <<<<<<<< HERE -->
<li><a href="AMOVA.html">10. AMOVA</a></li>
<!-- more stuff down here -->
Note that you don't need to change the number, when you run make all
, the perl script update_toc.pl
will automatically update the HTML from the table of contents.