{"repo":"brunoluiz/urlzap","free":true,"listed":false,"github":"https://github.com/brunoluiz/urlzap","clone":"git clone https://github.com/brunoluiz/urlzap.git","description":"⚡️ Your own static URL shortener","language":"Go","stars":84,"topics":["github-page","static-site-generator","static-site","static-website","url-shortener","redirect-urls","self-hosted","link-shortener","shorten-urls","redirects"],"license":"MIT","category":"self-hosted-apps","readme_excerpt":"URLZap Your own static URL shortener ⚡️ Static site generators, published on Github Pages, are quite popular nowadays. But what about a static URL shortener (to not say generator), which allows you to redirect URLs based on static files? Usually, developers end-up setting up a server with redirects for this (not statically). That is where URLZap comes in. It generates URLs using files and HTML wizardry, allowing users to host their own URL redirects into Github Pages. - 🔗 Similar to static website generators, but for URLs - 🔒 Keep your (shortened or not) URLs with you - 🌎 Can be used with Github Pages - ☕️ No need to run a server or set-up HTTP 301 redirects Example project: brunoluiz/ ☕️ How does it work? You might be asking yourself: how is this done without a server? Well, the answer lies on . It works as HTTP 301 (Redirect) status code, but it is done in the client-side. There is a bit more explanation on w3c website. Based on a config.yml containing the desired path and URL, urlzap will create index.html files which make use of meta refresh tags. It is not perfect as a HTTP 301, but is quite close. A similar strategy is used by other static website generators, such as Hugo. An example would be: Each key in the map will map to {.path param}/{key} routes, redirecting to {value} . This would generate the following: These files can be uploaded to Github Pages for example, not requiring any server. On brunoluiz/ you can see an example config.yml and checkout the output in ","default_branch":null,"files":null,"tree":[],"storefront":"/r/brunoluiz","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/brunoluiz/urlzap/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}