Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Pages] Update Nuxt framework guide and improve bindings coverage #12953

Merged
merged 17 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions content/pages/_partials/__create-github-repository-prefix.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
_build:
publishResources: false
render: never
list: never
---

A [binding](/pages/functions/bindings/) allows your application to interact with Cloudflare developer products, such as [KV](/kv/), [Durable Objects](/durable-objects/), [R2](/r2/), and [D1](/d1/).

If you intend to use bindings in your project, you must first set up your bindings for local and remote development.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
_build:
publishResources: false
render: never
list: never
---

Create a new GitHub repository by visiting [repo.new](https://repo.new). After creating a new repository, go to your newly created project directory to prepare and push your local application to GitHub by running the following commands in your terminal:
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
_build:
publishResources: false
render: never
list: never
---

## Create a GitHub repository

Create a new GitHub repository by visiting [repo.new](https://repo.new). After creating a new repository, go to your newly created project directory to prepare and push your local application to GitHub by running the following commands in your terminal:
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ _build:
list: never
---

{{<render file="__create-github-repository-prefix.md">}}
{{<render file="/_framework-guides/_create-github-repository-prefix.md">}}

```sh
$ git init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ _build:
list: never
---

{{<render file="__create-github-repository-prefix.md">}}
{{<render file="/_framework-guides/_create-github-repository-prefix.md">}}

```sh
$ git remote add origin https://github.com/<your-gh-username>/<repository-name>
Expand Down
14 changes: 14 additions & 0 deletions content/pages/_partials/_framework-guides/_git-integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
_build:
publishResources: false
render: never
list: never
---

## Git integration

In addition to [Direct Upload](/pages/get-started/direct-upload/) deployments, you can deploy projects via [Git integration](/pages/configuration/git-integration). Git integration allows you to connect a GitHub or GitLab repository to your Pages application and have your Pages application automatically built and deployed after each new commit is pushed to it.

{{<render file="_git-integration-warning.md">}}

Setup requires a basic understanding of [Git](https://git-scm.com/). If you are new to Git, refer to GitHub's [summarized Git handbook](https://guides.github.com/introduction/git-handbook/) on how to set up Git on your local machine.
12 changes: 12 additions & 0 deletions content/pages/_partials/_git-integration-warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
_build:
publishResources: false
render: never
list: never
---

{{<Aside type="warning" header="Git integration">}}

Currently, you cannot add Git integration to existing Pages applications. If you have already deployed your application, you need to create a new Pages application in order to add Git integration to it.

{{</Aside>}}
4 changes: 2 additions & 2 deletions content/pages/framework-guides/deploy-a-blazor-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Creating a `.gitignore` file ensures that only what is needed gets pushed onto y
$ dotnet new gitignore
```

{{<render file="_create-github-repository.md">}}
{{<render file="/_framework-guides/_create-github-repository.md">}}

{{<Aside type="note">}}

Expand Down Expand Up @@ -95,4 +95,4 @@ Or

2. Remove the `*.wasm` files from the output (`rm output/wwwroot/_framework/*.wasm`) and modify your Blazor application to [load the Brotli compressed files](https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-6.0#compression) instead.

{{<render file="_learn-more.md" withParameters="Blazor">}}
{{<render file="/_framework-guides/_learn-more.md" withParameters="Blazor">}}
4 changes: 2 additions & 2 deletions content/pages/framework-guides/deploy-a-brunch-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $ brunch new proj -s es6

{{<render file="_tutorials-before-you-start.md">}}

{{<render file="_create-github-repository.md">}}
{{<render file="/_framework-guides/_create-github-repository.md">}}

## Deploy with Cloudflare Pages

Expand All @@ -43,4 +43,4 @@ After deploying your site, you will receive a unique subdomain for your project

Every time you commit new code to your Brunch site, Cloudflare Pages will automatically rebuild your project and deploy it. You will also get access to [preview deployments](/pages/configuration/preview-deployments/) on new pull requests and be able to preview how changes look to your site before deploying them to production.

{{<render file="_learn-more.md" withParameters="Brunch">}}
{{<render file="/_framework-guides/_learn-more.md" withParameters="Brunch">}}
4 changes: 2 additions & 2 deletions content/pages/framework-guides/deploy-a-docusaurus-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $ npm create cloudflare@latest my-docusaurus-app -- --framework=docusaurus

{{<render file="_tutorials-before-you-start.md">}}

{{<render file="_create-github-repository.md">}}
{{<render file="/_framework-guides/_create-github-repository.md">}}

## Deploy with Cloudflare Pages

Expand All @@ -41,4 +41,4 @@ Every time you commit new code to your Docusaurus site and push those changes to

For the complete guide to deploying your first site to Cloudflare Pages, refer to the [Get started guide](/pages/get-started/).

{{<render file="_learn-more.md" withParameters="Docusaurus">}}
{{<render file="/_framework-guides/_learn-more.md" withParameters="Docusaurus">}}
4 changes: 2 additions & 2 deletions content/pages/framework-guides/deploy-a-gatsby-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $ npx gatsby new my-gatsby-site https://github.com/alxshelepenok/gatsby-starter-

{{<render file="_tutorials-before-you-start.md">}}

{{<render file="_create-github-repository_no_init.md">}}
{{<render file="/_framework-guides/_create-github-repository_no_init.md">}}

## Deploy with Cloudflare Pages

Expand Down Expand Up @@ -61,4 +61,4 @@ filename: _redirects
/users/* /users/[id] 200
```

{{<render file="_learn-more.md" withParameters="Gatsby">}}
{{<render file="/_framework-guides/_learn-more.md" withParameters="Gatsby">}}
4 changes: 2 additions & 2 deletions content/pages/framework-guides/deploy-a-gridsome-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $ npx gridsome create my-gridsome-website

{{<render file="_tutorials-before-you-start.md">}}

{{<render file="_create-github-repository.md">}}
{{<render file="/_framework-guides/_create-github-repository.md">}}

## Deploy with Cloudflare Pages

Expand All @@ -47,4 +47,4 @@ For the complete guide to deploying your first site to Cloudflare Pages, refer t

After deploying your site, you will receive a unique subdomain for your project on `*.pages.dev`. Every time you commit new code to your Gridsome project, Cloudflare Pages will automatically rebuild your project and deploy it. You will also get access to [preview deployments](/pages/configuration/preview-deployments/) on new pull requests, so you can preview how changes to your site look before deploying them to production.

{{<render file="_learn-more.md" withParameters="Gridsome">}}
{{<render file="/_framework-guides/_learn-more.md" withParameters="Gridsome">}}
4 changes: 2 additions & 2 deletions content/pages/framework-guides/deploy-a-hexo-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ $ hexo new "hello hexo"

Inside of `hello-hexo.md`, use Markdown to write the content of the article. You can customize the tags, categories or other variables in the article. Refer to the [Front Matter section](https://hexo.io/docs/front-matter) of the [Hexo documentation](https://hexo.io/docs/) for more information.

{{<render file="_create-github-repository.md">}}
{{<render file="/_framework-guides/_create-github-repository.md">}}

## Deploy with Cloudflare Pages

Expand Down Expand Up @@ -90,4 +90,4 @@ Some Hexo themes or plugins have additional requirements for different Node.js v

![Follow the instructions above to set up an environment variable in the Pages dashboard](/images/pages/framework-guides/node-version-pages.png)

{{<render file="_learn-more.md" withParameters="Hexo">}}
{{<render file="/_framework-guides/_learn-more.md" withParameters="Hexo">}}
4 changes: 2 additions & 2 deletions content/pages/framework-guides/deploy-a-hono-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ You should be able to review your generated web application at `http://localhost

{{<render file="_tutorials-before-you-start.md">}}

{{<render file="_create-github-repository.md">}}
{{<render file="/_framework-guides/_create-github-repository.md">}}

## Deploy with Cloudflare Pages

Expand Down Expand Up @@ -130,4 +130,4 @@ For the complete guide to deploying your first site to Cloudflare Pages, refer t
After deploying your site, you will receive a unique subdomain for your project on `*.pages.dev`.
Every time you commit new code to your Hono site, Cloudflare Pages will automatically rebuild your project and deploy it. You will also get access to [preview deployments](/pages/configuration/preview-deployments/) on new pull requests, so you can preview how changes look to your site before deploying them to production.

{{<render file="_learn-more.md" withParameters="Hono">}}
{{<render file="/_framework-guides/_learn-more.md" withParameters="Hono">}}
4 changes: 2 additions & 2 deletions content/pages/framework-guides/deploy-a-hugo-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ $ hugo new posts/hello-world.md

Inside of `hello-world.md`, add some initial content to create your post. Remove the `draft` line in your post's frontmatter when you are ready to publish the post. Any posts with `draft: true` set will be skipped by Hugo's build process.

{{<render file="_create-github-repository_no_init.md">}}
{{<render file="/_framework-guides/_create-github-repository_no_init.md">}}

## Deploy with Cloudflare Pages

Expand Down Expand Up @@ -208,4 +208,4 @@ If you plan to use [preview deployments](/pages/configuration/preview-deployment

{{</Aside>}}

{{<render file="_learn-more.md" withParameters="Hugo">}}
{{<render file="/_framework-guides/_learn-more.md" withParameters="Hugo">}}
4 changes: 2 additions & 2 deletions content/pages/framework-guides/deploy-a-jekyll-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Optionally, you may use a theme with your new Jekyll site if you would like to s

{{<render file="_tutorials-before-you-start.md">}}

{{<render file="_create-github-repository_no_init.md">}}
{{<render file="/_framework-guides/_create-github-repository_no_init.md">}}

If you are migrating an existing Jekyll project to Pages, confirm that your `Gemfile` is committed as part of your codebase. Pages will look at your Gemfile and run `bundle install` to install the required dependencies for your project, including the `jekyll` gem.

Expand Down Expand Up @@ -87,4 +87,4 @@ For the complete guide to deploying your first site to Cloudflare Pages, refer t
After deploying your site, you will receive a unique subdomain for your project on `*.pages.dev`.
Every time you commit new code to your Jekyll site, Cloudflare Pages will automatically rebuild your project and deploy it. You will also get access to [preview deployments](/pages/configuration/preview-deployments/) on new pull requests, so you can preview how changes look to your site before deploying them to production.

{{<render file="_learn-more.md" withParameters="Jekyll">}}
{{<render file="/_framework-guides/_learn-more.md" withParameters="Jekyll">}}
Loading
Loading