Coder Social home page Coder Social logo

nerdymomocat / url-shortener Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mimansajaiswal/url-shortener

0.0 0.0 0.0 295 KB

Uses Notion database as personal URL shortener

Home Page: https://notion-url-shortener.vercel.app

License: MIT License

JavaScript 5.57% TypeScript 94.43%

url-shortener's Introduction

Notion URL Shortener

CI XO code style license: MIT

Uses Notion database as personal URL shortener.

Features

  • Get your personal URL shortener with just a Notion.
  • Support custom, zero width, base64 type.
  • Private mode : Notion API token based authorization.
  • Count visits.

Demo

Getting Started

Prep work

  1. Create a Notion account
  2. Duplicate this Notion database template
  3. Create a Notion API integration & Get Token
  4. Share a database with your integration
  5. Deploy on Vercel
  6. Set NEXT_PUBLIC_NOTION_DATABASE_URL to your database URL, NOTION_API_TOKEN to your token obtained in step 3.

Deploy on Vercel

Deploy with Vercel

Environment Variables

NEXT_PUBLIC_NOTION_DATABASE_URL

Required Notion database page URL.

https://www.notion.so/<your-workspace>/a8aec43384f447ed84390e8e42c2e089
# or
https://<your-workspace>.notion.site/a8aec43384f447ed84390e8e42c2e089

NOTION_API_TOKEN

Required Notion API Key.

How to get Notion API Key

Show advanced options

USE_TOKEN_AUTH

If set to true, visitors without tokens cannot submit new URLs.

Default false

MAXIMUM_ZERO_WIDTH_SHORTEN_LENGTH

Maximum length of URL path with zero width shorten.

Default 8

MAXIMUM_BASE64_SHORTEN_LENGTH

Maximum length of URL path with base64 shorten.

Default 7

MAXIMUM_GENERATION_ATTEMPTS

Maximum number of times to retry when the generated URL path conflicts with the already registered URL path.

Default 5

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.