Skip to content

Commit

Permalink
feat: add analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
ariostas authored Apr 29, 2024
1 parent 09debbd commit 0f0b15e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ jobs:
- name: Install node dependencies
run: npm install
- name: Build site
run: npm run build
run: |
PREFIX_PATHS=true npm run build
mkdir website
mv public website/training-center
cp redirect.html website/index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public
path: ./website
deploy:
if: github.event_name == 'push'
needs: build
Expand Down
1 change: 1 addition & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
pathPrefix: `/training-center`,
siteMetadata: {
siteUrl: "https://hsf-training.org",
title: "HSF Training Center",
Expand Down
14 changes: 14 additions & 0 deletions redirect.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; url=/training-center/">
<script type="text/javascript">
window.location.href = "/training-center/"
</script>
<title>Page Redirection</title>
</head>
<body>
If you are not redirected automatically, follow this <a href='/training-center/'>link to the training center.</a>.
</body>
</html>
1 change: 1 addition & 0 deletions src/components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const Layout = ({ pageTitle, children }) => {
<>
<header>
<title>{pageTitle}</title>
<script defer data-domain="hepsoftwarefoundation.org" src="https://views.scientific-python.org/js/script.js"></script>
</header>
{/* navbar */}
<nav>
Expand Down

0 comments on commit 0f0b15e

Please sign in to comment.