qrtdown 1.3.1

  • Reference pages that link to a function in another package, such as \link[=sum]{sum()}, no longer lose their Arguments, Value, Details and Examples sections. tools::Rd2HTML() errored on any link it could not resolve, and the page fell back to a plain conversion that kept only Usage. Such links now render as code. If a page does still fall back, the warning names the sections it is missing and build_reference() ends with a count of incomplete pages.

  • build_site() and qrtdown_sitrep() now warn when generated files that .gitignore ignores are still tracked by git, and print the git rm -r --cached command that fixes it. Adding a path to .gitignore does not untrack committed files, so a package that used to commit its generated sources ended up half-tracked: old pages showed as modified after every build and new ones were never committed. Files are not untracked automatically.

  • deploy_site() no longer reports success when the deploy failed. Every git command’s exit status is now checked, and a failure stops the deploy with git’s own error message. After pushing, the remote branch is read back and the deploy only succeeds if it points at the new commit.

  • deploy_site() now pushes a single commit holding the current docs/ instead of the whole history of docs/ via git subtree. This avoids the timeouts a first deploy to Codeberg could hit, and no longer depends on git subtree. The pages branch is replaced on each deploy, so its history is not kept. The snapshot goes through a temporary git index, so files staged on the current branch are left alone. deploy_site() now returns the deployed commit’s SHA.

  • deploy_site()’s commit_message is now passed to git as a single argument. It was split on spaces and git read the extra words as file paths, so with the default message the commit failed (pathspec 'documentation' did not match any file(s)) and docs/ was never committed.

  • build_site() now renders README.qmd to README.md before building the home page, so edits to README.qmd reach the site without a manual render. It only renders when README.qmd is newer than README.md, so a README.md edited by hand is never overwritten (a warning says so instead). Turn this off with build_site(readme = FALSE). A README.Rmd is not rendered, but build_site() and qrtdown_sitrep() warn when README.md is older than its source.

  • The home page title can be set with home: title: in _qrtdown.yml. false leaves the page without a title (the browser tab still shows the package name), and a string replaces the package name.

qrtdown 1.3.0

Reference pages now render

  • Individual function pages are now rendered to HTML. They were generated into _qrtdown/reference/, but Quarto excludes any directory whose name begins with _ from project input discovery, so the _qrtdown/reference/*.qmd entry in the render list matched nothing: the pages were copied into docs/ as raw .qmd and clicking a function in the reference index downloaded a file. Generated content now lives in reference/ and articles/ at the package root, which also matches pkgdown’s URLs (/reference/build_site.html).

  • Existing _qrtdown.yml files that pin _qrtdown/reference.qmd (or the older bare reference.qmd) are remapped on read, so upgrading does not leave a dead Reference link or Unable to resolve link target warnings.

Reference pages match pkgdown more closely

  • Pages are built by rearranging tools::Rd2HTML() output with xml2 instead of converting Rd markup with regular expressions. This fixes lost } characters and adds support for \tabular, \describe, \eqn, \figure, \Sexpr, and man/macros/.
  • Sections are ordered as pkgdown orders them. Description previously appeared after Value.
  • The page title is the Rd \title{} rather than the function name.
  • Arguments render as a definition list with #arg-* anchors, replacing a markdown table that flattened newlines and escaped |.
  • Examples are emitted as executable chunks, so Quarto evaluates them and shows output and plots. \dontrun{}, \donttest{}, \dontshow{}, \testonly{}, and @examplesIf map onto chunk options.
  • Function calls are autolinked to their documentation, locally and across packages, by a new post-render step.
  • docs/pkgdown.yml is written so other packages can link into a qrtdown site.
  • “View source” links now resolve. They were built from the first URL entry in DESCRIPTION, which is conventionally the documentation site, producing a doubled slash against the wrong host. The forge URL is detected instead, the default branch is resolved rather than assumed to be main, and the defining file is read from roxygen2’s Rd header instead of guessed by scanning R/.

Reference index and articles match pkgdown’s structure

  • The index is a definition list rather than a markdown table. Every function a topic documents now appears, so a single .Rd covering several functions via @rdname no longer shows only the first: previously the others had a page but no way to reach it. Descriptions are no longer truncated at 80 characters.

  • Non-canonical aliases get redirect pages, so /reference/<alias>.html resolves to whichever page documents that alias.

  • \link{} cross-references resolve without the package being installed. tools::Rd2HTML() silently renders them as plain text when it cannot find the topic, so the alias index is now passed to it explicitly.

  • reference: in _qrtdown.yml supports pkgdown’s contents: selectors – starts_with(), ends_with(), matches(), contains(), has_keyword(), has_concept(), lacks_concepts(), everything(), and - for exclusion – and an entry matching nothing is an error rather than being dropped silently. The documented bare-list form of reference: now takes effect at all; only reference$sections was ever read, so grouping quietly did nothing.

  • A hand-written index must cover every exported topic, or the build aborts naming what is missing. A section titled internal satisfies the check without being rendered, as in pkgdown.

  • \keyword{internal} topics keep their page but are dropped from the index, and lifecycle badges are carried through.

  • Articles are published at /articles/<name>.html instead of /vignettes/articles/<name>.html, matching pkgdown. Sources stay in vignettes/articles/; the whole tree is mirrored into articles/ so relative image and data references keep working. Old article URLs redirect.

  • Article sources are no longer copied into the output directory beside the HTML Quarto had just rendered from them.

  • Render globs are anchored with a leading slash. Quarto matches an unanchored pattern at any depth, so articles/*.qmd also matched vignettes/articles/*.qmd and every article was rendered twice under two URLs.

The home page renders as HTML

  • build_home() now includes README.md in preference to README.qmd or README.Rmd, as pkgdown does, falling back to the source only when no rendered README.md exists. A README source almost always declares format: gfm so that it renders to README.md, and Quarto’s include shortcode lets the included file’s metadata override the including document – so the home page was written out as docs/index.md, with an index.html that was only a redirect stub to it, leaving the site with no usable landing page. Setting format: html on the generated index.qmd does not help: the included file still wins.

  • Because the rendered README.md is included, the README’s code is no longer re-executed while the site builds. Run devtools::build_readme() after changing README.qmd so the home page picks the change up.

The citation page keeps its metadata fields

  • build_citation() now evaluates inst/CITATION with meta bound to the package DESCRIPTION, as citation() does. Without it the near-universal note = sprintf("R package version %s", meta$Version) evaluated to character(0) and bibentry() dropped the field, so the site lost the version while citation("pkg") still showed it. A CITATION that cannot be parsed now warns instead of silently producing no citation block.

deploy_site() fixes

  • deploy_site() no longer warns 'git commit ...' had status 1 on every successful deploy. system2() attaches a status attribute only on a non-zero exit, so reading it back was NULL on success and the commit was always attempted – warning whenever there was nothing to commit, and leaving the “No changes to commit” branch unreachable.

  • deploy_site() stages docs/ with git add -f, so a docs/ that is gitignored on the source branch still deploys. The previous code stripped a bare docs line from .gitignore, which missed the usual /docs/ and docs/ spellings; git add then staged nothing and new pages never reached the pages branch. That .gitignore rewriting is gone – deploy_site() no longer edits your .gitignore.

Checking a built site

  • New inst/scripts/check-site.R inspects docs/ after a build and exits non-zero on failure, for use as a CI step. qrtdown_sitrep() validates a setup before a build; this validates the output of one that reported success. Each check corresponds to a defect that shipped behind a green build. See “Checking the Build Came Out Right” in vignette("getting-started").

Build and preview reliability

  • Quarto is located via quarto::quarto_path(), then QUARTO_PATH, then PATH. A bare Sys.which("quarto") missed the copies bundled with RStudio and Positron, so build_site() could abort while a shell quarto render worked.
  • New regenerate() rewrites the generated sources without rendering, and is wired into _quarto.yml as a Quarto pre-render script. Quarto’s watcher only watches .qmd files, so a devtools::document() never used to reach a running preview; now quarto render and quarto preview behave like build_site(). Set prerender: false in _qrtdown.yml to opt out.
  • Generated files are only rewritten when their content changes. Rewriting identical files bumped their mtimes, which invalidated Quarto’s freeze cache on every build and made a running preview re-render in a loop.
  • preview_site() always regenerates before serving, and runs Quarto with the package root as the working directory.
  • clean_site() removes _freeze/, which it previously only reported, and no longer deletes the current staging directories as “legacy” files.
  • build_site(lazy = TRUE) and build_site(examples = FALSE) now do something; both arguments were previously ignored.
  • Pages for topics whose .Rd file has been removed are pruned.
  • A DESCRIPTION without Authors@R no longer aborts the build.

qrtdown 1.2.1

qrtdown 1.2.0

qrtdown 1.1.0

  • New unit tests created

qrtdown 1.0.0

  • CLI interface added (use_qrtdown_cli())
  • Enhanced qrtdown_sitrep() with CLI status and deployment info
  • Fixed reference page HTML parsing for descriptions and examples
  • Fixed bullet point rendering in reference pages
  • Added acknowledgments to pkgdown and altdoc

qrtdown 0.2.0

  • documentation updated

qrtdown 0.1.0

Initial release

Features

  • Automatic conversion of roxygen2 documentation to Quarto markdown
  • Support for custom reference organization via _qrtdown.yml
  • Integration with usethis functions
  • GitHub Actions workflow for automatic deployment
  • Follows the documentation style used in sqlm and ti packages