From eded53e84970efeb983fe8d422dba8a9b130ebd4 Mon Sep 17 00:00:00 2001 From: Ekwuno <obinnacodes@gmail.com> Date: Mon, 11 Jul 2022 17:16:27 +0100 Subject: [PATCH] Remove numbers from filename. --- .../_index.md | 1 - .../ab-testing.md | 0 .../cors-headers.md | 1 + .../{9_advanced-mode.md => advanced-mode.md} | 0 .../{3_api-reference.md => api-reference.md} | 0 .../functions/{5_bindings.md => bindings.md} | 0 .../{2_first-function.md => first-function.md} | 0 .../functions/{1_get-started.md => get-started.md} | 12 ++++++++++-- .../{7_local-development.md => local-development.md} | 0 .../functions/{6_middleware.md => middleware.md} | 0 ...ing-from-workers.md => migrating-from-workers.md} | 0 ...1_pricing-and-limits.md => pricing-and-limits.md} | 0 .../platform/functions/{4_routing.md => routing.md} | 0 13 files changed, 11 insertions(+), 3 deletions(-) rename content/pages/platform/functions/{8_Function examples => Function-examples}/_index.md (88%) rename content/pages/platform/functions/{8_Function examples => Function-examples}/ab-testing.md (100%) rename content/pages/platform/functions/{8_Function examples => Function-examples}/cors-headers.md (92%) rename content/pages/platform/functions/{9_advanced-mode.md => advanced-mode.md} (100%) rename content/pages/platform/functions/{3_api-reference.md => api-reference.md} (100%) rename content/pages/platform/functions/{5_bindings.md => bindings.md} (100%) rename content/pages/platform/functions/{2_first-function.md => first-function.md} (100%) rename content/pages/platform/functions/{1_get-started.md => get-started.md} (57%) rename content/pages/platform/functions/{7_local-development.md => local-development.md} (100%) rename content/pages/platform/functions/{6_middleware.md => middleware.md} (100%) rename content/pages/platform/functions/{10_migrating-from-workers.md => migrating-from-workers.md} (100%) rename content/pages/platform/functions/{11_pricing-and-limits.md => pricing-and-limits.md} (100%) rename content/pages/platform/functions/{4_routing.md => routing.md} (100%) diff --git a/content/pages/platform/functions/8_Function examples/_index.md b/content/pages/platform/functions/Function-examples/_index.md similarity index 88% rename from content/pages/platform/functions/8_Function examples/_index.md rename to content/pages/platform/functions/Function-examples/_index.md index 223085007..a687f5e9a 100644 --- a/content/pages/platform/functions/8_Function examples/_index.md +++ b/content/pages/platform/functions/Function-examples/_index.md @@ -1,6 +1,5 @@ --- type: overview -hideChildren: true pcx-content-type: navigation title: Functions examples weight: 8 diff --git a/content/pages/platform/functions/8_Function examples/ab-testing.md b/content/pages/platform/functions/Function-examples/ab-testing.md similarity index 100% rename from content/pages/platform/functions/8_Function examples/ab-testing.md rename to content/pages/platform/functions/Function-examples/ab-testing.md diff --git a/content/pages/platform/functions/8_Function examples/cors-headers.md b/content/pages/platform/functions/Function-examples/cors-headers.md similarity index 92% rename from content/pages/platform/functions/8_Function examples/cors-headers.md rename to content/pages/platform/functions/Function-examples/cors-headers.md index b547b7c99..50e985012 100644 --- a/content/pages/platform/functions/8_Function examples/cors-headers.md +++ b/content/pages/platform/functions/Function-examples/cors-headers.md @@ -9,6 +9,7 @@ weight: 1002 layout: example --- +This example is a snippet from our Cloudflare Pages Template repo. ```js --- diff --git a/content/pages/platform/functions/9_advanced-mode.md b/content/pages/platform/functions/advanced-mode.md similarity index 100% rename from content/pages/platform/functions/9_advanced-mode.md rename to content/pages/platform/functions/advanced-mode.md diff --git a/content/pages/platform/functions/3_api-reference.md b/content/pages/platform/functions/api-reference.md similarity index 100% rename from content/pages/platform/functions/3_api-reference.md rename to content/pages/platform/functions/api-reference.md diff --git a/content/pages/platform/functions/5_bindings.md b/content/pages/platform/functions/bindings.md similarity index 100% rename from content/pages/platform/functions/5_bindings.md rename to content/pages/platform/functions/bindings.md diff --git a/content/pages/platform/functions/2_first-function.md b/content/pages/platform/functions/first-function.md similarity index 100% rename from content/pages/platform/functions/2_first-function.md rename to content/pages/platform/functions/first-function.md diff --git a/content/pages/platform/functions/1_get-started.md b/content/pages/platform/functions/get-started.md similarity index 57% rename from content/pages/platform/functions/1_get-started.md rename to content/pages/platform/functions/get-started.md index 2b9ca69b4..e66275152 100644 --- a/content/pages/platform/functions/1_get-started.md +++ b/content/pages/platform/functions/get-started.md @@ -10,11 +10,19 @@ weight: 1 Cloudflare Workers provides a serverless [execution environment](https://www.cloudflare.com/en-gb/learning/serverless/what-is-serverless/) that allows you to create entirely new applications or augment existing ones without configuring or maintaining infrastructure. -Previously, you could only add dynamic functionality to your Pages site by manually deploying a Worker using Wrangler, which meant that your application is written across both Pages and Workers. Functions allow you to leverage the Workers platform directly from within a Pages project by utilizing a project's filesystem convention. This enables you to deploy your entire site – both its static and dynamic content – when you `git push`. +Previously, you could only add dynamic functionality to your Pages site by manually deploying a Worker using Wrangler, which meant that your application is written across both Pages and Workers. + +Functions allow you to leverage the Workers platform directly from within a Pages project by utilizing a project's filesystem convention. In addition, Functions enable you to deploy your entire site – static and dynamic content – when you `git push`. + +{{<Aside type="note" header="Functions is currently in beta">}} +You can track current issues that the Pages team is fixing in Known issues. Let us know any unreported issues by posting in the Cloudflare Developers Discord. +{{</Aside>}} ## Setup -To get started, create a `/functions` directory at the root of your project. Writing your Functions files in this directory will automatically generate a Worker with custom functionality at the predesignated routes. +To get started, create a `/functions` directory at the root of your project. Writing your Functions files in this directory automatically generates a Worker with custom functionality at the predesignated routes. + +Now that you have your `/functions` directory setup, get started [writing your first function](/pages/platform/functions/first-function/) ## Demo diff --git a/content/pages/platform/functions/7_local-development.md b/content/pages/platform/functions/local-development.md similarity index 100% rename from content/pages/platform/functions/7_local-development.md rename to content/pages/platform/functions/local-development.md diff --git a/content/pages/platform/functions/6_middleware.md b/content/pages/platform/functions/middleware.md similarity index 100% rename from content/pages/platform/functions/6_middleware.md rename to content/pages/platform/functions/middleware.md diff --git a/content/pages/platform/functions/10_migrating-from-workers.md b/content/pages/platform/functions/migrating-from-workers.md similarity index 100% rename from content/pages/platform/functions/10_migrating-from-workers.md rename to content/pages/platform/functions/migrating-from-workers.md diff --git a/content/pages/platform/functions/11_pricing-and-limits.md b/content/pages/platform/functions/pricing-and-limits.md similarity index 100% rename from content/pages/platform/functions/11_pricing-and-limits.md rename to content/pages/platform/functions/pricing-and-limits.md diff --git a/content/pages/platform/functions/4_routing.md b/content/pages/platform/functions/routing.md similarity index 100% rename from content/pages/platform/functions/4_routing.md rename to content/pages/platform/functions/routing.md -- GitLab