Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/henrikbengtsson/pkgdown.extras
R package: pkgdown.extras: Enhancing the 'pkgdown' Package
https://github.com/henrikbengtsson/pkgdown.extras
documentation package pkgdown r
Last synced: 15 days ago
JSON representation
R package: pkgdown.extras: Enhancing the 'pkgdown' Package
- Host: GitHub
- URL: https://github.com/henrikbengtsson/pkgdown.extras
- Owner: HenrikBengtsson
- Created: 2021-03-08T05:50:00.000Z (almost 4 years ago)
- Default Branch: develop
- Last Pushed: 2024-08-08T17:25:09.000Z (5 months ago)
- Last Synced: 2024-08-08T20:23:00.854Z (5 months ago)
- Topics: documentation, package, pkgdown, r
- Language: R
- Homepage: https://github.com/HenrikBengtsson/pkgdown.extras
- Size: 42 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pkgdown.extras - Enhancing the 'pkgdown' Package
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.
## Usage
### Build full pkgdown site
From R:
```sh
> pkgdown.extras::build_site()
```From the command line:
```sh
$ 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:
1. 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 folderc. Copy all of the man/ folder to temporary folder in case `.Rbuildignore` drops for instance `man/figures/` files
d. Copy all `*.md` files in the package root to the temporary folder
2. "shim" any `NEWS` (or `inst/NEWS`) file to a `NEWS.md` file 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.md` file from a `NEWS` file)3. 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 ``, 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.
## Installation
To install this package, call:
```sh
remotes::install_github("HenrikBengtsson/pkgdown.extras")
```## Disclaimer
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.[pkgdown]: https://cran.r-project.org/packagee=pkgdown