DEV Community

Clark Weckmann
Clark Weckmann

Posted on • Originally published at weckmann.me on

Jekyll Short Url

Jekyll Short Url uses Goo.gl as a backend and a small Script on your 404 page.

PLEASE NOTE THAT GOOGLE HAS SHUT DOWN GOO.GL

How To

Place this in your 404 page.

<script>if (window.location.href.indexOf("sh") > -1) {var shortCode = document.location.href.substring( document.location.href.lastIndexOf( '/' ) );window.location.href = "https://goo.gl" + shortCode; }</script>
Enter fullscreen mode Exit fullscreen mode

To use Jekyll Short Url simply navigate toyourblog.com/sh/shorturl.

Example: https://clarkhacks.com/sh/48KCGo


Reply via email

Top comments (0)