Skip to content

Instantly share code, notes, and snippets.

@rickydazla
Last active May 3, 2023 13:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rickydazla/4f93b0e2fc249a1b9bd204cfe11e7c45 to your computer and use it in GitHub Desktop.
Save rickydazla/4f93b0e2fc249a1b9bd204cfe11e7c45 to your computer and use it in GitHub Desktop.
Liquid Re-Direct Snippet
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="1;url={{ redirect }}">
<script type="text/javascript">
window.top.location.href = "{{ redirect }}"
</script>
<title>Page Redirection</title>
</head>
<body>
<p>If you are not redirected automatically, follow the <a href="{{ redirect }}">{{ cta }}</a></p>
</body>
</html>
{%- comment -%}
<!-- Usage -->
{%- layout none -%}
{%- include 'redirect' with 'https://domain.com/', cta: 'link to home' -%}
{%- endcomment -%}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment