Last active
January 20, 2020 10:27
-
-
Save daviddarnes/983142e7a2fce94044df0c87ffa7d39c to your computer and use it in GitHub Desktop.
Redirect Ghost preview links to your JAMstack site
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
if (location.hostname.includes('ghost.io') && !location.href.includes('ghost.io/p/')) { | |
location.hostname = 'my-jamstack-site.com'; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment