Skip to content

Instantly share code, notes, and snippets.

@Kernix13
Created September 15, 2022 15:23
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Kernix13/c6035f82c5205fe9cb7268f8201bf1db to your computer and use it in GitHub Desktop.
Convert blog title to URL slug (my first gist)
const blogTitle = "How to create a GitHub Gist";
const urlSlug = blogTitle.toLowerCase().split(" ").filter(word => word !== "").join("-");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment