Create a Quarto file based on defined template
Source:R/create_from_template.R
create_from_template.RdThis function creates a Quarto file based on defined template
by copying the necessary template files
into the _extensions directory and generating
a new Quarto Markdown (.qmd) file.
Value
This function does not return a value. It performs file operations to set up the Quarto IOM story template in the current working directory.
Details
The function performs the following steps:
Checks if
file_nameis provided. If not, it will be index per default.Verifies what
templateis selected.Creates the
_extensionsdirectory if it does not exist.Creates a subdirectory within
_extensionsfor the specified extension.Copies the extension files from the package's internal
extdatadirectory to_extensions.Checks if the extension files were successfully copied.
Creates a new Quarto Markdown file based on the template.
Opens the new file in the editor.