From 327e1c7816b80af0cefb8471fa437d85ac968d8b Mon Sep 17 00:00:00 2001 From: maxlisewski Date: Mon, 4 Nov 2024 14:31:58 +0100 Subject: [PATCH] debuggin prefixes --- src/pages/index.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/pages/index.js b/src/pages/index.js index 0a09bb8..6da8824 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,5 +1,5 @@ import * as React from "react" -import { Link } from "gatsby" +import { Link, withPrefix } from "gatsby" import Header from "../components/layouts/Header" import Footer from "../components/layouts/Footer" import Section from "../components/elements/Section" @@ -9,6 +9,14 @@ import AccessibilityNav from '../components/layouts/AccessibilityNav' import HeadComponent from '../components/layouts/HeadComponent' const IndexPage = () => { + const debugInfo = { + nodeEnv: process.env.NODE_ENV, + prefix: withPrefix("/"), + publicUrl: process.env.PUBLIC_URL, + baseUrl: typeof window !== 'undefined' ? window.location.href : '', + pathPrefix: process.env.PATH_PREFIX, + } + return ( <>
@@ -17,15 +25,24 @@ const IndexPage = () => { +
+
+
+

Debug Information:

+
+              {JSON.stringify(debugInfo, null, 2)}
+            
+
+