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 223085007ee2e7a87d8c5145f2afd980524120a4..a687f5e9ab0a9823c0e90a5138fd871e003d8366 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 b547b7c99cf61d189149eb6696ad87db1103a325..50e9850122a0caeecdadc6711675d31a78362a40 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 2b9ca69b4254895fcb0ccdd04eb48d6fa7912f7f..e66275152d2ab561f2666e2c4edc7ba178b57740 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