Production Run Control Script

Author

Steven J. Pierce

This file is used to demonstrate using a production script to render other scripts to automatically date-stamped, customized file names.

library(here)    # for here().
here() starts at C:/Users/pierces1/OneDrive - Michigan State University/CSTATRedirects/Documents/R/sjpierce.github.io
library(quarto)  # for quarto_render().

The chunk below will render just the HTML version of the production output from Example1.qmd.

OutFile <- paste0("Example1_", Sys.Date(), ".html")

# Render the script in a fresh R session.
quarto_render(input = here("examples/Example1.qmd"), 
              output_format = "html",
              execute_dir = here::here("examples"),
              output_file = OutFile)
pandoc --output Example1_2025-02-16.html
  to: html
  output-file: Example1_Draft.html
  standalone: true
  embed-resources: true
  title-prefix: Piercing Insight
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  css:
    - ../styles.css
  toc: true
  
metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  theme: spacelab
  bibliography:
    - ../references.bib
  csl: ../apa.csl
  title: 'Example 1: Separating Draft vs. Production Output'
  author:
    - name: Steven J. Pierce
      orcid: 0000-0002-0679-3019
      email: pierces1@msu.edu
  
Output created: ..\docs\examples\Example1_2025-02-16.html