Code
from ccbr_tools.templates import get_quarto_extensions
get_quarto_extensions()
['fnl']
templates
Template files for CCBR Tools.
submit_slurm.sh
– slurm submission script templatemkdocs-fnl
- theme for websites built with mkdocs material.pkgdown-fnl
- theme for R package websites built with pkgdown.Quarto HTML format with FNL branding guidelines
First run ccbr_tools quarto-add fnl
, then modify your _quarto.yml
file with the following:
Name | Description |
---|---|
get_quarto_extensions | List quarto extensions in this package |
read_template | Read a template file |
use_quarto_ext | Use a Quarto extension |
use_template | Uses a template, formats variables, and writes it to a file. |
List quarto extensions in this package
Name | Type | Description |
---|---|---|
extensions | list | List of quarto extension names to use with use_quarto_ext |
Read a template file
Name | Type | Description | Default |
---|---|---|---|
template_name | str | Name of the template file | required |
Name | Type | Description |
---|---|---|
template | str | Contents of the template file |
Use a Quarto extension
Name | Type | Description | Default |
---|---|---|---|
ext_name | str | The name of the extension in ccbr_tools | required |
Uses a template, formats variables, and writes it to a file.
Name | Type | Description | Default |
---|---|---|---|
template_name | str | The name of the template to use. | required |
output_filepath | str | The filepath to save the output file. If not provided, it will be written to template_name in the current working directory. |
None |
**kwargs | str | Keyword arguments to fill in the template variables. | {} |
Name | Type | Description |
---|---|---|
FileNotFoundError | If the template file is not found. | |
IOError | If there is an error writing the output file. |