summaryrefslogtreecommitdiff
path: root/src/pages/edge
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/edge')
-rw-r--r--src/pages/edge/australia/index.astro9
-rw-r--r--src/pages/edge/index.astro21
-rw-r--r--src/pages/edge/not-australia/index.astro9
3 files changed, 39 insertions, 0 deletions
diff --git a/src/pages/edge/australia/index.astro b/src/pages/edge/australia/index.astro
new file mode 100644
index 0000000..59965dd
--- /dev/null
+++ b/src/pages/edge/australia/index.astro
@@ -0,0 +1,9 @@
+---
+import Layout from "../../../layouts/Layout.astro";
+import EdgeFunctionExplainer from "../../../components/EdgeFunctionExplainer.astro";
+---
+
+<Layout title="In Australia">
+ <h1 class="mb-8">You are in Australia!</h1>
+ <EdgeFunctionExplainer />
+</Layout>
diff --git a/src/pages/edge/index.astro b/src/pages/edge/index.astro
new file mode 100644
index 0000000..f49f3a9
--- /dev/null
+++ b/src/pages/edge/index.astro
@@ -0,0 +1,21 @@
+---
+import Layout from '../../layouts/Layout.astro';
+import Markdown from '../../components/Markdown.astro';
+
+const explainer = `
+# You've reached the fallback page.
+
+This page is using a [Netlify Edge Function](https://docs.netlify.com/edge-functions/overview/) to rewrite the URL based on visitor geography.
+
+For it to be invoked, please either run this site locally with \`netlify dev\` or deploy it to Netlify.
+
+Edge Functions are framework-agnostic, but are also used behind the scenes to run Next.js Middleware on Netlify.
+There are advatanges to using Edge Functions directly, such as the ability to access & transform the response body.
+
+[See more examples](https://edge-functions-examples.netlify.app)
+`;
+---
+
+<Layout title="Fallback">
+ <Markdown content={explainer} />
+</Layout>
diff --git a/src/pages/edge/not-australia/index.astro b/src/pages/edge/not-australia/index.astro
new file mode 100644
index 0000000..74c2577
--- /dev/null
+++ b/src/pages/edge/not-australia/index.astro
@@ -0,0 +1,9 @@
+---
+import Layout from '../../../layouts/Layout.astro';
+import EdgeFunctionExplainer from '../../../components/EdgeFunctionExplainer.astro';
+---
+
+<Layout title="Not Autralia">
+ <h1 class="mb-8">You&apos;re not in Australia!</h1>
+ <EdgeFunctionExplainer />
+</Layout>