From 0f0b15e93180706bf8ea148a6ca14d17731f62d0 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Mon, 29 Apr 2024 16:40:50 -0400 Subject: [PATCH 1/3] feat: add analytics --- .github/workflows/build-and-deploy.yml | 8 ++++++-- gatsby-config.js | 1 + redirect.html | 14 ++++++++++++++ src/components/layout.js | 1 + 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 redirect.html diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index d75b2a9..565425b 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -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 diff --git a/gatsby-config.js b/gatsby-config.js index 5993660..332f8b7 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -1,4 +1,5 @@ module.exports = { + pathPrefix: `/training-center`, siteMetadata: { siteUrl: "https://hsf-training.org", title: "HSF Training Center", diff --git a/redirect.html b/redirect.html new file mode 100644 index 0000000..f9e819c --- /dev/null +++ b/redirect.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + If you are not redirected automatically, follow this link to the training center.. + + \ No newline at end of file diff --git a/src/components/layout.js b/src/components/layout.js index a4047de..0a38d5a 100644 --- a/src/components/layout.js +++ b/src/components/layout.js @@ -15,6 +15,7 @@ const Layout = ({ pageTitle, children }) => { <>
{pageTitle} +
{/* navbar */}