From be4de751ad432f8230d83e1d6cbb3e56d608cd58 Mon Sep 17 00:00:00 2001 From: TomasBankauskas Date: Tue, 9 Apr 2024 13:44:24 +0300 Subject: updates --- src/pages/edge/australia/index.astro | 9 +++++++++ src/pages/edge/index.astro | 21 +++++++++++++++++++++ src/pages/edge/not-australia/index.astro | 9 +++++++++ 3 files changed, 39 insertions(+) create mode 100644 src/pages/edge/australia/index.astro create mode 100644 src/pages/edge/index.astro create mode 100644 src/pages/edge/not-australia/index.astro (limited to 'src/pages/edge') 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"; +--- + + +

You are in Australia!

+ +
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) +`; +--- + + + + 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'; +--- + + +

You're not in Australia!

+ +
-- cgit v1.2.3