Skip to contents

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-modified to today on every save
    • Preserves post body; only replaces YAML front matter
    • Optional .bak backup 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 its index.qmd has draft: true set 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 uses rstudioapi::getSourceEditorContext() instead of rstudioapi::getActiveDocumentContext(), so it resolves the target file correctly even when the R Console has focus
    • add_coins() auto-resolves a directory argument to the index.qmd file inside it, with a clear error if no such file exists
    • The \donttest{} example of add_coins() uses tempfile() instead of tempdir(), so repeated runs no longer hit a stale COinS chunk and a readline() 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 with str_locate()/str_sub() instead of str_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 both edit_post() and add_coins()

qpost 1.0.0

CRAN release: 2026-09-12

  • Package renamed from quartopost to qpost
  • Main function renamed from quartopost() to qpost()
  • New exported function add_coins() for COinS metadata generation
  • add_coins() gains a file_path argument, so it can be used outside RStudio/Positron by passing the target file explicitly
  • All option names updated from quartopost.* prefix to qpost.*