We’re happy to announce that pkgdown 1.4.0 is now available on CRAN. pkgdown is designed to make it quick and easy to build a website for your package. Install it with:
install.packages("pkgdown")
Development and deployment modes
The main change in this version is that
build_site()
,
build_reference()
and
build_home()
gain a devel
parameter that controls whether you’re in deployment or development mode.
-
devel = FALSE
activates deployment mode, which installs the package into a temporary library, and runs examples/articles in a new process. It’s the default forbuild_site()
.If you’re using
build_site()
as part of an existing deployment workflow, you may need to setinstall = FALSE
so that the package doesn’t get installed twice. -
devel = TRUE
activates development mode, simulates package loading withpkgload::load_all()
and does all work in the same process. This makes it most suitable for rapid iteration, and so is the default forbuild_reference()
.
There were two related changes to build_reference()
and build_home()
: build_reference()
no longer runs devtools::document()
and build_home()
no longer rebuilds README.Rmd
. This makes pkgdown’s responsibilities more clear: it only modifies files in docs/
.
Other important changes
-
build_home()
now strips quotes fromTitle
andDescription
fields when generating page metadata. Additionally, you can now override the defaults via thetitle
anddescription
fields in thehome
section of_pkgdown.yml
. Setting a custom title is good practice as it allows you to add “R” and “package” to the title, which is likely to be useful for SEO. -
vignette("linking")
describes how pkgdown’s automatic linking works, and how to ensure that cross-package links point to the right place. -
For external packages, if we can’t find an existing pkgdown website to link to we now link to https://rdrr.io.
-
The rendering of
\examples{}
,\dots
,\tabular{}
,\subsection{}
, and\preformatted{}
has been improved. -
The navbar is now automatically hidden with headroom.js, and the sidebar is implemented with pure CSS.
Acknowledgements
A big thank you goes to @jayhesselberth (the co-maintainer of pkgdown), and to to the 77 other people who contributed to the release: @abodnahk, @agila5, @AliciaSchep, @andrie, @aravind-j, @asardaes, @Bisaloo, @Blackglade, @burgerga, @cboettig, @cderv, @chfleming, @choisy, @CrumpLab, @davidski, @DavisVaughan, @ddiez, @docbiz, @dongzhuoer, @dpprdan, @echasnovski, @EmilHvitfeldt, @emilyriederer, @espinielli, @florisvdh, @flying-sheep, @Fredo-XVII, @grabear, @GregorDeCillia, @gustavdelius, @gvegayon, @hadley, @ijlyttle, @IndrajeetPatil, @jackwasey, @jangorecki, @jemus42, @jennybc, @jeroen, @JohnCoene, @katrinleinweber, @kevinushey, @kkmann, @krlmlr, @maelle, @maksymiuks, @manish-saraswat-olx, @maurolepore, @maxheld83, @maximilianmordig, @mcanouil, @MichaelChirico, @mitchelloharawild, @mjsteinbaugh, @msberends, @muschellij2, @NEONKID, @noamross, @nteetor, @paul-buerkner, @peterdesmet, @ramiromagno, @rorynolan, @royfrancis, @s-fleck, @scizmeli, @sdhutchins, @seanhardison1, @seymakalay, @sharlagelfand, @surmann, @talgalili, @TheOnlyArtz, @thierrygosselin, @thomasp85, @tobyhodges, and @yiluheihei