Skip to content

Commit

Permalink
(fix) Support old /get-started URL (#75)
Browse files Browse the repository at this point in the history
Add a redirect + JS hook to support the old get started URL.
Simply redirect to homepage with open APM modal.
  • Loading branch information
the-overengineer authored Jan 4, 2021
1 parent 18e6235 commit 78bc283
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 9 additions & 3 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,17 @@ function bootOnboarding() {
$("#onboarding-modal").modal("show")
})
window.addEventListener("message", function (tag) {
if (tag.data === "complete") {
window.open("https://apm.kamon.io", "_blank")
if (tag.origin.includes("apm.kamon.io")) {
if (tag.data === "complete") {
window.open("https://apm.kamon.io", "_blank")
}
$("#onboarding-modal").modal("hide")
}
$("#onboarding-modal").modal("hide")
})

if (window.location.hash === "#get-started") {
$("#onboarding-modal").modal("show")
}
}

$(document).ready(function() {
Expand Down
6 changes: 6 additions & 0 deletions get-started.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
layout: default
title: 'Get started with Kamon'
description: 'Support old getting started URL'
redirect_to: /#get-started
---

0 comments on commit 78bc283

Please sign in to comment.