qpost 1.1.0
CRAN release: 2026-09-16
- New exported function
edit_post()for editing existing post YAML metadata via dialog- Pre-populates dialog with current YAML values
- Auto-updates
date-modifiedto today on every save - Preserves post body; only replaces YAML front matter
- Optional
.bakbackup before modification - Available as RStudio/Positron addin
-
edit_post()handles title changes interactively:- When the title is modified in the dialog, the title field shows an amber warning reminding the user that a directory decision will follow
- After clicking Done, the user is asked whether to create a new post directory for the new title
-
Yes: all files are copied to a new directory named after the new title’s kebab-case slug; the old directory is renamed to
_old-slug.bak/(hidden from Quarto rendering by the leading_) and itsindex.qmdhasdraft: trueset as an additional safety signal; the new file is opened automatically in the editor -
No: only the YAML
title:field is updated; the directory name stays unchanged - If the target new directory already exists, the operation falls back to a YAML-only update with a warning
- Bug fixes:
-
add_coins()now usesrstudioapi::getSourceEditorContext()instead ofrstudioapi::getActiveDocumentContext(), so it resolves the target file correctly even when the R Console has focus -
add_coins()auto-resolves a directory argument to theindex.qmdfile inside it, with a clear error if no such file exists - The
\donttest{}example ofadd_coins()usestempfile()instead oftempdir(), so repeated runs no longer hit a stale COinS chunk and areadline()prompt in a non-interactive context - YAML rendering now correctly escapes quotation marks in user input via the new internal helper
escape_yaml_dq(); all text fields (title, subtitle, author, image-alt) are safe for special characters - the YAML block replacement in
edit_post()now splices text withstr_locate()/str_sub()instead ofstr_replace(): ICU replacement strings treat backslash and$as escape characters, which silently undid the quote escaping on every edit - Fixed Windows line-ending bug:
readr::read_file()reads in binary mode, so files with CRLF line endings caused the YAML-replacement regex to silently fail on Windows; line endings are now normalised (CRLF -> LF) immediately after reading in bothedit_post()andadd_coins()
-
qpost 1.0.0
CRAN release: 2026-09-12
- Package renamed from
quartoposttoqpost - Main function renamed from
quartopost()toqpost() - New exported function
add_coins()for COinS metadata generation -
add_coins()gains afile_pathargument, so it can be used outside RStudio/Positron by passing the target file explicitly - All option names updated from
quartopost.*prefix toqpost.*
