Skip to content

Compiling the website

Zhian N. Kamvar edited this page Mar 4, 2015 · 2 revisions

Setup

In order to compile the website, a few things are needed:

  1. The most recent R version
  2. The Rstudio IDE
  3. The Rmarkdown package
  4. The knitcitations package
  5. This script to run the content of the website:
    • install.packages(c("poppr", "mmod", "genetics", "magrittr"))
  6. perl
  7. 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.

Adding a new page

If you want to add a new page to the website, there are a couple of steps needed:

  1. Add your page in Rmarkdown format (*.Rmd).
  2. Add the basename of the new page to toc.txt in the appropriate place (preface, body, or appendix).
  3. 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 run make 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.

Clone this wiki locally