find_yaml: Find posts containing the specified metadata

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Given a YAML field name, find the (R) Markdown files that contain this field and its value contains any of the specified values. Functions find_tags() and find_categories() are wrappers of find_yaml() with field = 'tags' and field = 'categories', respectively; count_fields() returns the frequency tables of the specified YAML fields, such as the counts of tags and categories.

Usage

1
2
3
4
5
6
7
find_yaml(field = character(), value = character(), open = FALSE)

find_tags(value = character(), open = FALSE)

find_categories(value = character(), open = FALSE)

count_yaml(fields = c("categories", "tags"), sort_by_count = TRUE)

Arguments

field, fields

A character vector of YAML field names.

value

A vector of the field values to be matched.

open

Whether to open the matched files automatically.

sort_by_count

Whether to sort the frequency tables by counts.

Value

find_yaml() returns a character vector of filenames; count_yaml() returns a list of frequency tables.

Examples

1
2
3
4
5
library(blogdown)
find_tags(c("time-series", "support vector machine"))
find_categories("Statistics")

count_yaml(sort_by_count = FALSE)

blogdown documentation built on Sept. 5, 2021, 5:42 p.m.

Related to find_yaml in blogdown...