Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# ymlthis 1.0.0

## Lifecycle

* ymlthis is now retired. Only changes necessary to keep it on CRAN will be
made. Quarto now provides excellent YAML support, making a specialized
YAML-writing package less necessary.

## Bug fixes

* Fixed deprecation warning from purrr: replaced `vec_depth()` with
`pluck_depth()` (#91).
* Fixed bug in `setup_chunk()` where `chunk_code` expressions were not
properly captured (#88, thanks @dchiu911).

# ymlthis 0.1.7
* Fix typo in add-in checking for miniUI (#84, #85, thanks @tonycmac &
@lquayle88)
Expand Down
4 changes: 2 additions & 2 deletions R/use_yml.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ return_yml_code <- function(.yml) {
#' top-level fields will be ignored. `use_site_yml` creates `_site.yml` for use
#' with R Markdown websites and third-party tools like the distill package (see
#' [the R Markdown book for
#' more](https://bookdown.org/yihui/rmarkdown/rmarkdown-site.html#)).
#' more](https://yihui.org/rmarkdown/rmarkdown-site.html#)).
#' `use_navbar_yml` is a special type of site YAML that only specifies the
#' navbar in `_navbar.yml` `use_pkgdown_yml()` and `use_bookdown_yml()` write
#' YAML files specific to those packages; see the
#' [pkgdown](https://pkgdown.r-lib.org/articles/pkgdown.html) and
#' [blogdown](https://bookdown.org/yihui/bookdown/configuration.html)
#' [blogdown](https://yihui.org/bookdown/configuration.html)
#' documentation for more.
#'
#' By default, the yaml package adds a new line to the end of files. Some
Expand Down
12 changes: 6 additions & 6 deletions R/yml_blogdown.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' YAML in blogdown comes from a variety of sources. Most YAML will be for your
#' posts, as described in the [blogdown
#' book](https://bookdown.org/yihui/blogdown/content.html#yaml-metadata)).
#' book](https://yihui.org/blogdown/content.html#yaml-metadata)).
#' Common R Markdown fields can be used, but there are two other main sources
#' for YAML fields: Hugo itself and the Hugo theme you are using. Hugo has
#' numerous top-level YAML to control the output (see the [Hugo
Expand All @@ -12,14 +12,14 @@
#' addition to these sources of YAML, the configuration file for your blog can
#' also be in YAML, but this is not very common; most use a `config.toml` file,
#' based on TOML (see the [blogdown
#' book](https://bookdown.org/yihui/blogdown/configuration.html) for more).
#' book](https://yihui.org/blogdown/configuration.html) for more).
#'
#' @template describe_yml_param
#' @param draft Logical. Set post as a draft? Draft posts will not be rendered
#' if the site is built via `blogdown::build_site()` or
#' `blogdown::hugo_build()` but will be rendered in the local preview mode.
#' See [Section D.3 of the blogdown
#' book](https://bookdown.org/yihui/blogdown/local-preview.html#local-preview).
#' book](https://yihui.org/blogdown/local-preview.html#local-preview).
#'
#' @param publishdate A future date to publish the post. Future posts are only
#' rendered in the local preview mode
Expand All @@ -30,7 +30,7 @@
#' @param slug A character string used as the tail of the post URL. It is
#' particularly useful when you define custom rules for permanent URLs. See
#' [Section 2.2.2 of the blogdown
#' book](https://bookdown.org/yihui/blogdown/configuration.html#options).
#' book](https://yihui.org/blogdown/configuration.html#options).
#' @param aliases A character vector of one or more aliases (e.g., old published
#' paths of renamed content) that will be created in the output directory
#' structure
Expand All @@ -48,8 +48,8 @@
#' @param layout The layout Hugo should use while rendering the content. By
#' default, `layout` matches `type` and is thus based on the directory.
#' However, it's possible to use additional layouts within a type. See [Hugo's
#' Defining a Content Type
#' documentation](https://gohugo.io/content-management/types/#defining-a-content-type).
#' content types
#' documentation](https://gohugo.io/configuration/content-types/).
#'
#' @param lastmod The date the content was last modified at
#' @param link_title used for creating links to content. Note that the actual
Expand Down
4 changes: 2 additions & 2 deletions R/yml_bookdown.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Set Top-level YAML options for bookdown
#'
#' bookdown uses YAML in three main places, as described in the [bookdown
#' book](https://bookdown.org/yihui/rmarkdown/bookdown-project.html):
#' book](https://yihui.org/rmarkdown/bookdown-project.html):
#' `index.Rmd`, `_output.yml`, and `_bookdown.yml`. `index.Rmd` can take most
#' YAML. `_output.yml` is intended for output-related YAML, such as that
#' produced by `yml() %>% yml_output(bookdown::pdf_book())`. `_bookdown.yml` is
Expand Down Expand Up @@ -145,7 +145,7 @@ yml_bookdown_site <- function(.yml) {
#'
#' `gitbook_config()` is a helper function to specify the `config` argument in
#' [bookdown::gitbook()], as described in the [bookdown
#' book](https://bookdown.org/yihui/bookdown/html.html).
#' book](https://yihui.org/bookdown/html.html).
#'
#' @param toc_collapse Collapse some items initially when a page is loaded via
#' the collapse option. Its possible values are "subsection" (the default),
Expand Down
4 changes: 2 additions & 2 deletions R/yml_params.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
#'
#' R Markdown lets you add dynamic parameters to your report using the `params`
#' YAML field (see the [R Markdown
#' book](https://bookdown.org/yihui/rmarkdown/parameterized-reports.html) for
#' book](https://yihui.org/rmarkdown/parameterized-reports.html) for
#' examples); parameterized reports are also used in RStudio Connect. The values
#' of these variables can be called inside your R Markdown document using
#' `params$field_name`. [There are several ways to change the values of the
#' parameters](https://bookdown.org/yihui/rmarkdown/params-knit.html): manually
#' parameters](https://yihui.org/rmarkdown/params-knit.html): manually
#' change the YAML, use the `params` argument in `rmarkdown::render()`, or knit
#' with parameters, which launches a Shiny app to select values for each.
#' `yml_params()` accepts any number of named R objects to set as YAML fields.
Expand Down
4 changes: 2 additions & 2 deletions R/yml_rmarkdown.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' The `runtime` field lets you use Shiny in your R Markdown document, making it
#' interactive. See the [R Markdown
#' book](https://bookdown.org/yihui/rmarkdown/interactive-documents.html) for
#' book](https://yihui.org/rmarkdown/interactive-documents.html) for
#' examples.
#'
#' @template describe_yml_param
Expand Down Expand Up @@ -170,7 +170,7 @@ yml_resource_files <- function(.yml, resource_files) {
#' Add site options for `_site.yml` and navbars for R Markdown websites
#'
#' R Markdown has a simple website builder baked in (see the R [Markdown
#' book](https://bookdown.org/yihui/rmarkdown/rmarkdown-site.html#site_navigation)
#' book](https://yihui.org/rmarkdown/rmarkdown-site.html#site_navigation)
#' for a detailed description). An R Markdown website must have at least have an
#' `index.Rmd` file and a `_site.yml` file (which can be empty). Including YAML
#' in `_site.yml` will apply it to all R Markdown files for the website, e.g.
Expand Down
4 changes: 2 additions & 2 deletions R/yml_rsconnect.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#' that tells RStudio Connect about the email output. Several `rsc_*` fields
#' exist to specify different components of the email, which can be set in the
#' YAML header or programmatically using `rmarkdown::output_metadata()`. See the
#' [RStudio Connect
#' documentation](https://docs.rstudio.com/connect/1.7.2/user/r-markdown.html)
#' [Posit Connect
#' documentation](https://docs.posit.co/connect/user/rmarkdown/)
#' for more. `yml_output_metadata()` allows you to add any type of content to
#' the `rmd_output_metadata` field.
#'
Expand Down
6 changes: 5 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@ knitr::opts_chunk$set(
<!-- badges: start -->
[![R-CMD-check](https://github.com/r-lib/ymlthis/workflows/R-CMD-check/badge.svg)](https://github.com/r-lib/ymlthis/actions)
[![Codecov test coverage](https://codecov.io/gh/r-lib/ymlthis/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-lib/ymlthis?branch=main)
[![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)
[![Lifecycle: retired](https://img.shields.io/badge/lifecycle-retired-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#retired)
[![CRAN status](https://www.r-pkg.org/badges/version/ymlthis)](https://cran.r-project.org/package=ymlthis)
<!-- badges: end -->

## Status: Retired

ymlthis is now retired: only changes necessary to keep it on CRAN will be made. ymlthis was created when managing YAML in R Markdown was difficult. [Quarto](https://quarto.org/) has since resolved these issues with autocomplete, validation, and helpful error messages for YAML. We recommend Quarto for new projects. Existing ymlthis code will continue to work, and the package will remain on CRAN.

ymlthis makes it easy to write YAML front matter for R Markdown and related documents. `yml_*()` functions write functions and `use_*()` functions let you write the resulting YAML to your clipboard or to `.yml` files related to your project.

## Installation
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,20 @@
[![Codecov test
coverage](https://codecov.io/gh/r-lib/ymlthis/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-lib/ymlthis?branch=main)
[![Lifecycle:
maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)
retired](https://img.shields.io/badge/lifecycle-retired-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#retired)
[![CRAN
status](https://www.r-pkg.org/badges/version/ymlthis)](https://cran.r-project.org/package=ymlthis)
<!-- badges: end -->

## Status: Retired

ymlthis is now retired: only changes necessary to keep it on CRAN will
be made. ymlthis was created when managing YAML in R Markdown was
difficult. [Quarto](https://quarto.org/) has since resolved these issues
with autocomplete, validation, and helpful error messages for YAML. We
recommend Quarto for new projects. Existing ymlthis code will continue
to work, and the package will remain on CRAN.

ymlthis makes it easy to write YAML front matter for R Markdown and
related documents. `yml_*()` functions write functions and `use_*()`
functions let you write the resulting YAML to your clipboard or to
Expand Down Expand Up @@ -67,7 +76,7 @@ yml() %>%
#> affiliation: RStudio
#> - name: Hadley Wickham
#> affiliation: RStudio
#> date: '2022-06-24'
#> date: '2026-02-16'
#> output:
#> word_document:
#> keep_md: true
Expand Down
23 changes: 17 additions & 6 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
## R CMD check results

0 errors | 0 warnings | 0 note
0 errors | 0 warnings | 0 notes

* This patch fixes a bug from the previous patch
## Release summary

## revdepcheck results
This is a major version bump marking ymlthis as retired. The package will
remain on CRAN for existing users but will only receive critical maintenance
fixes going forward. Quarto now provides excellent YAML tooling that addresses
the needs ymlthis was created to solve.

We checked 3 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
This release also includes:
- Fixed deprecation warning from purrr 1.0.0: replaced `vec_depth()` with
`pluck_depth()` (#91)
- Fixed NSE bug in `setup_chunk()` (#88)
- Updated all stale URLs (bookdown.org → yihui.org, docs.rstudio.com →
docs.posit.co, gohugo.io content types)

* We saw 0 new problems
* We failed to check 0 packages
## Reverse dependencies

We checked 3 reverse dependencies, comparing R CMD check results across CRAN
and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Analytics
autocomplete
CJKmainfont
CMD
CN
Expand Down
2 changes: 1 addition & 1 deletion man/gitbook_config.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/use_file_yml.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions man/yml_blogdown_opts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/yml_bookdown_opts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/yml_params.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/yml_rsconnect_email.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/yml_runtime.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/yml_site_opts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading