Skip to content

Commit

Permalink
#196 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
manciniedoardo committed Aug 7, 2024
1 parent 4c464f8 commit f731e16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/check_post_tags.R
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit f731e16

Please sign in to comment.