Skip to content

Commit 57eb365

Browse files
committed
spelling check
1 parent c93f9f5 commit 57eb365

4 files changed

Lines changed: 16 additions & 5 deletions

File tree

R/autoqmd_insert_includes.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#'
2525
#' @details
2626
#' If a template is provided (via the `template` argument),
27-
#' its modification time and the mtimes of files it sources
27+
#' its modification time and the `mtimes` of files it sources
2828
#' (detected by [`autoqmd_dependency_stamp()`]) are added
2929
#' to the autogenerated block as an invisible HTML comment.
3030
#' This ensures that Quarto's `freeze:` mechanism correctly

checklist.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,5 @@ spelling:
3636
ignore:
3737
- .github
3838
- LICENSE.md
39+
- tests/testthat/species_template.qmd
40+
- tests/testthat/iris_chapter.qmd

inst/en_gb.dic

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
bookdown
2+
autogenerated
3+
offs
4+
Pandoc
5+
shortname
6+
standalone

vignettes/articles/autoqmd.qmd

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Autogenerated child `.qmd` files are most useful when a report contains many sec
3333
Compared to alternatives, this approach offers several advantages:
3434

3535
* Manual copy-paste does not scale and is prone to inconsistencies.
36-
* Parameterised Quarto documents work well for generating multiple standalone reports, but are less suited for assembling many repeated sections within a single report or book.
36+
* Parametrised Quarto documents work well for generating multiple standalone reports, but are less suited for assembling many repeated sections within a single report or book.
3737
* Loops inside a single `.qmd` file can work for simple cases, but often lead to long, hard-to-read documents with complex chunk logic and limited control over section structure, chunk labels, and page breaks.
3838

3939
The `autoqmd_*()` approach trades a small amount of upfront structure for clearer separation of concerns: templates define what a section looks like, pre-render scripts define how many sections are needed, and Quarto handles where they appear in the final output.
@@ -83,10 +83,12 @@ Outside these markers, the document remains entirely under manual control.
8383

8484
### Step 2: Create template from which to make child documents
8585

86-
Next, define a template .qmd file that describes the structure of one repeated section. This template uses placeholder variables (e.g. `{{species}}` or `{{label}}`) that will be substituted during generation. The template can contain text, code chunks, figures, and cross-references, just like any other Quarto document.
86+
Next, define a template `.qmd` file that describes the structure of one repeated section. This template uses placeholder variables (e.g. `{{species}}` or `{{label}}`) that will be substituted during generation. The template can contain text, code chunks, figures, and cross-references, just like any other Quarto document.
8787

8888
Example: `species_template.qmd`
8989

90+
<!-- spell-check: ignore:start -->
91+
9092
```{r}
9193
#| echo: false
9294
# nolint start
@@ -133,13 +135,15 @@ ggplot(iris_spec_df, aes(x = Sepal.Length, y = Sepal.Width)) +
133135
# nolint end
134136
```
135137

138+
<!-- spell-check: ignore:end -->
139+
136140
Each generated child document will be a fully valid `.qmd` file derived from this template. Template files are never rendered directly by Quarto; they are only used as blueprints for generating temporary child documents.
137141

138142
### Step 3: Create pre-render script
139143

140144
Child documents are created and inserted before rendering, using a pre-render script. This script is responsible for:
141145

142-
1. Generating one child .qmd file per entity (here: per species)
146+
1. Generating one child `.qmd` file per entity (here: per species)
143147
2. Inserting `{{< include >}}` directives between the markers in the main chapter
144148

145149
This can be done either explicitly or via a convenience wrapper.
@@ -188,7 +192,7 @@ autoqmd_prepare(
188192
When the pre-render script is executed, the following things happen:
189193

190194
* The directory `child_qmd` is created (if needed)
191-
* One temporary child .qmd file is generated per species
195+
* One temporary child `.qmd` file is generated per species
192196
* The main chapter is updated between the markers only
193197

194198
```{text}

0 commit comments

Comments
 (0)