R/write_slugs.R

Defines functions write_slugs

write_slugs <- function(slugs)
	Map(slug=slugs, name=names(slugs),
	    function(slug, name) {str_replace_all(name, '_', ' ') %>% sprintf(fmt='[%s]: {{< ref "%s" >}}', slug)}) |>
		str_c(collapse='\n') |>
		cat()
ChristopherBarrington/project-notes-tools documentation built on June 23, 2024, 2:11 a.m.