diff --git a/R/check_post_tags.R b/R/check_post_tags.R index 05f16699..af696996 100644 --- a/R/check_post_tags.R +++ b/R/check_post_tags.R @@ -5,10 +5,10 @@ posts <- list.files("posts", recursive = TRUE, pattern = "*.qmd") source("R/allowed_tags.R") # Function to extract tags from a post and check them against the allowed list ---- -check_post_tags <- function(post, allowed_tags = allowed_tags) { +check_post_tags <- function(post, allowed = allowed_tags) { post_tags <- rmarkdown::yaml_front_matter(file.path("posts", post))$categories - cross_check <- post_tags %in% allowed_tags + cross_check <- post_tags %in% allowed problematic_tags <- post_tags[!cross_check]