Skip to content

Instantly share code, notes, and snippets.

@raclettes
Created March 24, 2021 20:20
Show Gist options
  • Save raclettes/44b59ed363fee1b1a1e4fb74946f023e to your computer and use it in GitHub Desktop.
Save raclettes/44b59ed363fee1b1a1e4fb74946f023e to your computer and use it in GitHub Desktop.
URL shortener config for ShareX for https://github.com/nelsontky/gh-pages-url-shortener

Usage

Use the above file, replacing...

  • {URL of shortener} by the root URL where you have the shortener installed. For example https://nlsn.cf/
  • {github token} your github access token
  • {repo} by your username and repo in full. For example nelsontky/gh-pages-url-shortener-db

Extra information

{
"Version": "13.3.0",
"Name": "GitHub Short URL",
"DestinationType": "URLShortener",
"RequestMethod": "POST",
"RequestURL": "https://api.github.com/repos/{repo}/issues",
"Headers": {
"Authorization": "token {github token}",
"Accept": "application/vnd.github.v3+json"
},
"Body": "JSON",
"Data": "{\"title\":\"$input$\",\"body\":\"$prompt:Alias?$\"}",
"URL": "{URL of shortener}/$json:number$"
}
{
"Version": "13.3.0",
"Name": "GitHub Short URL",
"DestinationType": "URLShortener",
"RequestMethod": "POST",
"RequestURL": "https://api.github.com/repos/{repo}/issues",
"Headers": {
"Authorization": "token {github token}",
"Accept": "application/vnd.github.v3+json"
},
"Body": "JSON",
"Data": "{\"title\":\"$input$\"}",
"URL": "{URL of shortener}/$json:number$"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment