diff --git a/.Rbuildignore b/.Rbuildignore index 620b2328e..347c78380 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -21,3 +21,4 @@ ^tools$ ^\.lintr.R$ ^vignettes/\.quarto$ +^vignettes/articles$ diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index ef9b21dca..725c4d48f 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -52,6 +52,11 @@ articles: contents: - starts_with("test") +- title: internal + contents: + - articles/test + - articles/test-quarto + reference: - title: Build diff --git a/vignettes/.gitignore b/vignettes/.gitignore index 2fa644087..540c19f9c 100644 --- a/vignettes/.gitignore +++ b/vignettes/.gitignore @@ -4,3 +4,5 @@ *_files /.quarto/ + +!knitr-chunks.R diff --git a/vignettes/articles/knitr-chunks.R b/vignettes/articles/knitr-chunks.R new file mode 100644 index 000000000..a24b90a17 --- /dev/null +++ b/vignettes/articles/knitr-chunks.R @@ -0,0 +1,3 @@ +# I would like to have those reused inside my articles / vignettes +## ----simple, echo=TRUE------------------------------- +1 + 1 diff --git a/vignettes/articles/test-quarto.qmd b/vignettes/articles/test-quarto.qmd new file mode 100644 index 000000000..805a75f38 --- /dev/null +++ b/vignettes/articles/test-quarto.qmd @@ -0,0 +1,24 @@ +--- +title: "test" +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + +```{r setup} +library(pkgdown) +``` + +```{r} +knitr::read_chunk("knitr-chunks.R") +``` + + +```{r} +#| label: simple +``` + diff --git a/vignettes/articles/test.Rmd b/vignettes/articles/test.Rmd new file mode 100644 index 000000000..26f27c061 --- /dev/null +++ b/vignettes/articles/test.Rmd @@ -0,0 +1,23 @@ +--- +title: "test" +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + +```{r setup} +library(pkgdown) +``` + +```{r} +knitr::read_chunk("knitr-chunks.R") +``` + +```{r} +#| label: simple +``` +