Skip to content

Instantly share code, notes, and snippets.

@daviddarnes
Last active January 20, 2020 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daviddarnes/983142e7a2fce94044df0c87ffa7d39c to your computer and use it in GitHub Desktop.
Save daviddarnes/983142e7a2fce94044df0c87ffa7d39c to your computer and use it in GitHub Desktop.
Redirect Ghost preview links to your JAMstack site
<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