Skip to content

Commit

Permalink
add beacon to the docs site
Browse files Browse the repository at this point in the history
  • Loading branch information
atqy authored and philasmar committed Apr 24, 2024
1 parent d894124 commit 89f9b06
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"_enableSearch": true,
"pdf": false,
"_disableContribution": true,
"_appFooter": "<div class='text-center'>© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.</div>"
"_appFooter": "<div class='text-center'>© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.</div><script src=../public/beacon_scode.js></script>"
}
}
}
8 changes: 8 additions & 0 deletions docs/template/public/beacon_scode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const cleanUrl = (url) => {
const { origin, pathname } = new URL(url);
return (origin + pathname).replace(new RegExp('/', 'g'), '|');
};

const assetUrl = cleanUrl(window.location.href);

void fetch(`https://prod.us-west-2.tcx-beacon.docs.aws.dev/basic-beacon/${assetUrl}`);

0 comments on commit 89f9b06

Please sign in to comment.