diff options
| author | TomasBankauskas <tbdizainas@gmail.com> | 2024-04-09 13:44:24 +0300 |
|---|---|---|
| committer | TomasBankauskas <tbdizainas@gmail.com> | 2024-04-09 13:44:24 +0300 |
| commit | be4de751ad432f8230d83e1d6cbb3e56d608cd58 (patch) | |
| tree | 7922668f00823e21ab7ab799fa4cf5c811bf0613 /src/pages/edge | |
| parent | 3bebbf00e6f4d33bfacbf38eef73a9ad7f0d9d58 (diff) | |
updates
Diffstat (limited to 'src/pages/edge')
| -rw-r--r-- | src/pages/edge/australia/index.astro | 9 | ||||
| -rw-r--r-- | src/pages/edge/index.astro | 21 | ||||
| -rw-r--r-- | src/pages/edge/not-australia/index.astro | 9 |
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're not in Australia!</h1> + <EdgeFunctionExplainer /> +</Layout> |
