Skip to content

Instantly share code, notes, and snippets.

@vanpariyar
Created November 1, 2022 07:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanpariyar/9039fcde5fa542291827d4c292a6f218 to your computer and use it in GitHub Desktop.
Save vanpariyar/9039fcde5fa542291827d4c292a6f218 to your computer and use it in GitHub Desktop.
Google App script day to day working functions that i use for development tasks

get slug from URL and change URL of article links

function GETCONTENTCREATORURL( articleUrl ) {
  const contentSiteUrl = "REPLACE_CONTENTENT_SITE_URL";
  const slug = articleUrl.split('/');
  return contentSiteUrl+slug[ slug.length-2 ]+'/'+slug[ slug.length-1 ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment