View source: R/configureBook.R
configureBook | R Documentation |
Helper function to run at the top-level directory of Bioconductor book packages,
to prepare for book compilation and to set up install-time resources for link
ing from other books.
configureBook(prefix = NULL, input = "index.Rmd", redirect = NULL)
prefix |
Optional string containing the prefix to be used when |
input |
Name of the index file for the book, see |
redirect |
Optional name of the file containing redirection information, to be passed to |
This function assumes that the bookdown-formatted book is located at inst/book
inside the package.
input
is interpreted relative to this location, e.g., if input="index.Rmd"
, the file should be located at inst/book/index.Rmd
.
Similarly, redirect
is provided, the file should already be present in vignettes/
.
For example, if redirect="redirect.txt"
, the file should be located at vignettes/redirect.txt
.
A number of files are created in the package directory.
A "references.csv"
file is created in the inst/rebook
directory,
containing the table of references from scrapeReferences
.
If prefix
is specified, a "prefix.csv"
file is also created in inst/rebook
.
This contains the preferred prefix of the book.
A Makefile is created in vignettes/
that triggers book compilation.
This will also generate HTMLs for redirection via createRedirects
if redirect
is provided.
A stub vignette at vignettes/stub.Rmd
is created that redirects to the deployed book location.
Aaron Lun
scrapeReferences
, which is called by this function to create the reference table.
link
, which is used by other books to link to the configured book.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.