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 andbuild_reference()ends with a count of incomplete pages.build_site()andqrtdown_sitrep()now warn when generated files that.gitignoreignores are still tracked by git, and print thegit rm -r --cachedcommand that fixes it. Adding a path to.gitignoredoes 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 currentdocs/instead of the whole history ofdocs/viagit subtree. This avoids the timeouts a first deploy to Codeberg could hit, and no longer depends ongit 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()’scommit_messageis 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)) anddocs/was never committed.build_site()now rendersREADME.qmdtoREADME.mdbefore building the home page, so edits toREADME.qmdreach the site without a manual render. It only renders whenREADME.qmdis newer thanREADME.md, so aREADME.mdedited by hand is never overwritten (a warning says so instead). Turn this off withbuild_site(readme = FALSE). AREADME.Rmdis not rendered, butbuild_site()andqrtdown_sitrep()warn whenREADME.mdis older than its source.The home page title can be set with
home: title:in_qrtdown.yml.falseleaves 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/*.qmdentry in the render list matched nothing: the pages were copied intodocs/as raw.qmdand clicking a function in the reference index downloaded a file. Generated content now lives inreference/andarticles/at the package root, which also matches pkgdown’s URLs (/reference/build_site.html).Existing
_qrtdown.ymlfiles that pin_qrtdown/reference.qmd(or the older barereference.qmd) are remapped on read, so upgrading does not leave a dead Reference link orUnable to resolve link targetwarnings.
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, andman/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@examplesIfmap onto chunk options. - Function calls are autolinked to their documentation, locally and across packages, by a new
post-renderstep. -
docs/pkgdown.ymlis written so other packages can link into a qrtdown site. - “View source” links now resolve. They were built from the first
URLentry 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 bemain, and the defining file is read from roxygen2’s Rd header instead of guessed by scanningR/.
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
.Rdcovering several functions via@rdnameno 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>.htmlresolves 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.ymlsupports pkgdown’scontents: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 ofreference:now takes effect at all; onlyreference$sectionswas 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
internalsatisfies 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>.htmlinstead of/vignettes/articles/<name>.html, matching pkgdown. Sources stay invignettes/articles/; the whole tree is mirrored intoarticles/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/*.qmdalso matchedvignettes/articles/*.qmdand every article was rendered twice under two URLs.
The home page renders as HTML
build_home()now includesREADME.mdin preference toREADME.qmdorREADME.Rmd, as pkgdown does, falling back to the source only when no renderedREADME.mdexists. A README source almost always declaresformat: gfmso that it renders toREADME.md, and Quarto’s include shortcode lets the included file’s metadata override the including document – so the home page was written out asdocs/index.md, with anindex.htmlthat was only a redirect stub to it, leaving the site with no usable landing page. Settingformat: htmlon the generatedindex.qmddoes not help: the included file still wins.Because the rendered
README.mdis included, the README’s code is no longer re-executed while the site builds. Rundevtools::build_readme()after changingREADME.qmdso the home page picks the change up.
The citation page keeps its metadata fields
-
build_citation()now evaluatesinst/CITATIONwithmetabound to the package DESCRIPTION, ascitation()does. Without it the near-universalnote = sprintf("R package version %s", meta$Version)evaluated tocharacter(0)andbibentry()dropped the field, so the site lost the version whilecitation("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 1on every successful deploy.system2()attaches astatusattribute only on a non-zero exit, so reading it back wasNULLon 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()stagesdocs/withgit add -f, so adocs/that is gitignored on the source branch still deploys. The previous code stripped a baredocsline from.gitignore, which missed the usual/docs/anddocs/spellings;git addthen staged nothing and new pages never reached the pages branch. That.gitignorerewriting is gone –deploy_site()no longer edits your.gitignore.
Checking a built site
- New
inst/scripts/check-site.Rinspectsdocs/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” invignette("getting-started").
Build and preview reliability
- Quarto is located via
quarto::quarto_path(), thenQUARTO_PATH, thenPATH. A bareSys.which("quarto")missed the copies bundled with RStudio and Positron, sobuild_site()could abort while a shellquarto renderworked. - New
regenerate()rewrites the generated sources without rendering, and is wired into_quarto.ymlas a Quartopre-renderscript. Quarto’s watcher only watches.qmdfiles, so adevtools::document()never used to reach a running preview; nowquarto renderandquarto previewbehave likebuild_site(). Setprerender: falsein_qrtdown.ymlto 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)andbuild_site(examples = FALSE)now do something; both arguments were previously ignored. - Pages for topics whose
.Rdfile has been removed are pruned. - A
DESCRIPTIONwithoutAuthors@Rno longer aborts the build.
qrtdown 1.2.1
qrtdown 1.2.0
- Fixed
use_qrtdown_version()to update navbar title in config files
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
build_site()- Build complete documentation website with Quartoinit_site()- Initialize qrtdown configurationclean_site()- Remove generated filespreview_site()- Preview site in browserbuild_home()- Build home page from READMEbuild_reference()- Build function reference from .Rd filesbuild_articles()- Build articles from vignettesbuild_news()- Build changelog from NEWS.mdbuild_citation()- Build citation pageuse_qrtdown()- Initialize qrtdown in a packageuse_qrtdown_github_pages()- Set up GitHub Pages deploymentuse_qrtdown_vignette()- Create a Quarto vignetteuse_qrtdown_citation()- Add citation informationrd_to_qmd()- Convert .Rd file to Quarto markdownqrtdown_sitrep()- Check qrtdown configuration
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