🌱
gardenabout

fix tags

2020-11-08

  • digital garden
  • note
  • slugify
  • tagging

If you have tags that are more than one word (digital garden?) you need to slugify your tags.

function slugifyTag(tag) {
return tag.toLowerCase()
.replace(/ /g, '-')
.replace(/[^\w-]+/g, '');
}

up next

  • content directories
  • templating

mentioned in

04 - content directories in next.js

working with content directories and dynamic routes in next.js

next postgenerating theme tokens
previous postthe future of `garden`
...they don't have to know that it's haunted