Skip to content

Commit 3b70018

Browse files
committed
redirect
1 parent 4fe9de6 commit 3b70018

File tree

5 files changed

+24
-8
lines changed

5 files changed

+24
-8
lines changed

_layouts/default.liquid

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@
2121
{% else %}
2222
{% assign redirect = page.redirect | relative_url %}
2323
{% endif %}
24-
<meta http-equiv="refresh" content="3; url={{ redirect }}">
24+
{% if page.instant %}
25+
<script>
26+
window.location.href = '{{ redirect }}';
27+
</script>
28+
{% else %}
29+
<meta http-equiv="refresh" content="3; url={{ redirect }}">
30+
{% endif %}
2531
{% endif %}
2632
{% include head.liquid %}
2733
<!-- Google Tag Manager -->

_pages/about_redirect.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
layout: page
3+
permalink: /about/
4+
title: "Redirecting..."
5+
redirect: true
6+
instant: true
7+
---
8+
9+
Redirecting to the homepage...

_pages/profiles.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
layout: profiles
3-
permalink: /about/
3+
# permalink: /about/
44
title: about
55
description: my journey and what I like to do
66
nav: false
7-
nav_order: 7
8-
notes: false
9-
search: true
7+
# nav_order: 7
8+
# notes: false
9+
# search: true
1010

1111
profiles:
1212
# if you want to include more than one profile, just replicate the following block

package-lock.json

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"devDependencies": {
33
"@shopify/prettier-plugin-liquid": "1.10.0",
4-
"prettier": "3.6.2"
4+
"prettier": "^3.6.2"
55
}
66
}

0 commit comments

Comments
 (0)