The pkgdown package supports only Rmarkdown and knitr vignettes. Vignettes using other types of vignette engines are not supported and are silently ignored by pkgdown. This package provides workarounds for some non-Rmarkdown vignette formats. For example, engine 'R.rsp::rsp' processes RSP-embedded Markdown vignettes into Markdown document, which then are compiled into final HTML documents. This package pre-compiles such documents into Markdown and tricks pkgdown to believe they are Rmarkdown vignettes so that they appear as pkgdown articles.
From the command line:
$ Rscript -e pkgdown.extras::build_site
This will build the full pkgdown website in a temporary folder and copy the results to the
docs/ folder in the current working directory. When building the website, the above function will:
Create a pruned copy of the package folder in a temporary folder by:
a. Build a package tarball via
R CMD build --no-build-vignettes
b. Extra tarball into temporary folder
c. Copy all of the man/ folder to temporary folder in case
.Rbuildignoredrops for instance
d. Copy all
*.mdfiles in the package root to the temporary folder
inst/NEWS) file to a
NEWS.mdfile that is recognized by pkgdown. The result is that the NEWS entries are rendered nicely in the 'ChangeLog' menu created by pkgdown. (Function
news_to_md()can be used to manually generate a
NEWS.mdfile from a
shim non-Rmarkdown vignettes, which are silently ignored by pkgdown, into Rmarkdown vignettes. This is achieved by weaving the vignette using the vignette engine that the vignette declares, which results in either a HTML or a PDF vignette product. For PDFs, a shim Rmarkdown vignette, which will both provide a link to the PDF as well as including it in an
<iframe>, is created on-the-fly so pkgdown incorporates the vignette. HTML documents are automatically added to the 'Articles' menu by pkgdown; when clicking on those in the menu, the vignette will be opened in a separate browser tab.
For all shimmed documents, any "Source: <link>" is adjusted such that it links to the proper source.
To install this package, call:
I have no intention of submitting this to CRAN or providing end-user support for it. I use it for pkgdown:ing my own packages.