Skip to content

Commit

Permalink
[Docs] Update URLs (Hugo, old folder structure) (#17322)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrosousa authored Oct 4, 2024
1 parent 11833cc commit dab00fe
Show file tree
Hide file tree
Showing 54 changed files with 199 additions and 248 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ This spawns a server that will be accessible via `http://localhost:1111` in your

### Recommendations

Part of our application accesses the GitHub API (to populate the [Wrangler changelog](https://github.com/cloudflare/cloudflare-docs/blob/production/layouts/partials/wrangler-changelog.html)).
Part of our application accesses the GitHub API (to populate the [Wrangler changelog](https://developers.cloudflare.com/workers/platform/changelog/wrangler/)).

<!--
Since GitHub gives a higher request limit to authenticated requests, you may want to add a [classic token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#personal-access-tokens-classic) with permissions for `repos:public_repo` to `/assets/secrets/github_token.txt`. The token value should be the only thing in your file.
-->

## Deployment

Expand All @@ -61,12 +63,12 @@ Please note that we may use AI tools to help us review technical documentation,

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npx astro build` | Build your production site to `./dist/` |
| `npm run astro -- --help` | Get help using the Astro CLI |
| Command | Action |
|:--------------------------|:--------------------------------------------|
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:1111` |
| `npx astro build` | Build your production site to `./dist/` |
| `npm run astro -- --help` | Get help using the Astro CLI |

## 👀 Want to learn more?

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ai-gateway/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ sidebar:

import { ProductChangelog } from "~/components";

{/* <!-- Actual content lives in /data/changelogs/ai-gateway.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}
{/* <!-- Actual content lives in /src/content/changelogs/ai-gateway.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}

<ProductChangelog />
5 changes: 2 additions & 3 deletions src/content/docs/api-shield/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ changelog_file_name:
- api-shield
sidebar:
order: 10

---

import { ProductChangelog } from "~/components"
import { ProductChangelog } from "~/components";

{/* <!-- Actual content lives in /content/changelogs/api-shield.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}
{/* <!-- Actual content lives in /src/content/changelogs/api-shield.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}

<ProductChangelog />
5 changes: 2 additions & 3 deletions src/content/docs/bots/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ changelog_file_name:
- bots
sidebar:
order: 13

---

import { ProductChangelog } from "~/components"
import { ProductChangelog } from "~/components";

{/* <!-- Actual content lives in /content/changelogs/bots.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}
{/* <!-- Actual content lives in /src/content/changelogs/bots.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}

<ProductChangelog />
5 changes: 2 additions & 3 deletions src/content/docs/browser-rendering/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ sidebar:
order: 8
head: []
description: Review recent changes to Worker Browser Rendering.

---

import { ProductChangelog } from "~/components"
import { ProductChangelog } from "~/components";

{/* <!-- Actual content lives in /data/changelogs/radar.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}
{/* <!-- Actual content lives in /src/content/changelogs/radar.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}

<ProductChangelog />
5 changes: 2 additions & 3 deletions src/content/docs/d1/platform/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ changelog_file_name:
- d1
sidebar:
order: 4

---

import { ProductChangelog } from "~/components"
import { ProductChangelog } from "~/components";

{/* <!-- Actual content lives in /data/changelogs/d1.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}
{/* <!-- Actual content lives in /src/content/changelogs/d1.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}

<ProductChangelog />
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 'General updates'
title: "General updates"
pcx_content_type: concept
changelog_file_name:
- ddos
Expand All @@ -9,11 +9,10 @@ sidebar:
head:
- tag: title
content: Changelog for general updates to DDoS protection

---

import { ProductChangelog } from "~/components"
import { ProductChangelog } from "~/components";

{/* <!-- Actual content lives in /content/changelogs/ddos.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}
{/* <!-- Actual content lives in /src/content/changelogs/ddos.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}

<ProductChangelog />
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ sidebar:
head:
- tag: title
content: Automation | How we do it

---

Cloudflare uses the following automations to streamline our documentation process.
Expand All @@ -15,13 +14,12 @@ Cloudflare uses the following automations to streamline our documentation proces

At Cloudflare, we use several automations to reduce the cost associated with content maintenance.

| Automation | Purpose | Implementation | Runs when |
| ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------- |
| [Internal link checking](https://github.com/cloudflare/cloudflare-docs/blob/production/bin/crawl.ts) | Evaluates all internal links to make sure they are in the current build. Increases cross linking while reducing maintenance cost. | GitHub Actions | Every commit |
| External link checking | Evaluates external links for broken links or links that redirect to another location. | SEO crawler | Weekly |
| [Header link checking](https://github.com/cloudflare/cloudflare-docs/blob/production/.github/workflows/anchor-link-audit.yml) | Evaluates anchor links within our docs to make sure they resolve correctly. | GitHub Actions | Every weekend |
| [API docs link checking](https://github.com/cloudflare/cloudflare-docs/blob/production/.github/workflows/api-links-crawl.yml) | Evaluates links to our API docs. | GitHub Actions | Every weekend |
| [Unused images check](https://github.com/cloudflare/cloudflare-docs/blob/production/.github/workflows/image-audit.yml) | Flags images that are in our resources, but not currently referenced in our documentation. | GitHub Actions | Every month |
| Automation | Purpose | Implementation | Runs when |
| ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -------------- | ------------- |
| External link checking | Evaluates external links for broken links or links that redirect to another location. | SEO crawler | Weekly |
| [Header link checking](https://github.com/cloudflare/cloudflare-docs/blob/production/.github/workflows/anchor-link-audit.yml) | Evaluates anchor links within our docs to make sure they resolve correctly. | GitHub Actions | Every weekend |
| [API docs link checking](https://github.com/cloudflare/cloudflare-docs/blob/production/.github/workflows/api-links-crawl.yml) | Evaluates links to our API docs. | GitHub Actions | Every weekend |
| [Unused images check](https://github.com/cloudflare/cloudflare-docs/blob/production/.github/workflows/image-audit.yml) | Flags images that are in our resources, but not currently referenced in our documentation. | GitHub Actions | Every month |

## Reporting

Expand All @@ -39,4 +37,3 @@ The following resources help contributors and stakeholders when they are making
| [Show before/after links](https://github.com/cloudflare/cloudflare-docs/blob/production/.github/workflows/show-changed-files.yml) | Provides a comparison table that shows the current page in production and the changed page in a preview build. | GitHub Actions | Every Pages build |
| [Flag needed redirects](https://github.com/cloudflare/cloudflare-docs/blob/production/.github/workflows/comment-changed-filenames.yml) | Comments with a list of changed or deleted files that might need a redirect. | GitHub Actions | Every commit |
| [Validate redirects](https://github.com/cloudflare/cloudflare-docs/blob/production/bin/validate-redirects.ts) | Verifies whether the commit adds conflicting or invalid redirects. | GitHub Actions | Every commit |
| [Spell check](https://github.com/cloudflare/cloudflare-docs/blob/production/.github/workflows/spell-check.yml) | Flags issues with spelling, casing, or insensitive language. | GitHub Actions | Every commit |
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ sidebar:
head:
- tag: title
content: Redirects | Best practices

---

Beyond [how Cloudflare uses redirects](/docs-guide/manage-content/redirects/process/), we follow these best practices.
Expand All @@ -15,7 +14,7 @@ Beyond [how Cloudflare uses redirects](/docs-guide/manage-content/redirects/proc

As much as you can, try to organize your redirects into logical groups (products, alphabetical order). This process helps prevent duplicate redirects, as well as identifying specific ones you might be looking for.

In our [Pages `_redirects` file](https://github.com/cloudflare/cloudflare-docs/blob/production/content/_redirects), we use extensive comments, separating different product areas. We also try, as much as we can, to keep the redirects in alphabetical order within a section.
In our [Pages `_redirects` file](https://github.com/cloudflare/cloudflare-docs/blob/production/public/_redirects), we use extensive comments, separating different product areas. We also try, as much as we can, to keep the redirects in alphabetical order within a section.

We used to apply a similar principle to [Bulk Redirect lists](/rules/url-forwarding/bulk-redirects/) (when that was our primary method). We created lists that grouped together similar products and labeled them as such, so it was easier to find which redirect you were looking for.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ sidebar:
head:
- tag: title
content: Redirects | How we do it

---

There are [multiple ways](https://developers.google.com/search/docs/crawling-indexing/301-redirects) of performing redirects, including at your server, client-side redirects, and using a CDN.
Expand All @@ -19,7 +18,7 @@ We use various Cloudflare products for our redirects, due to ease of use and spe

### Cloudflare Pages (primary)

Our primary method takes advantage of the [Pages platform](/pages/configuration/redirects/), defining redirects in a [plain text file](https://github.com/cloudflare/cloudflare-docs/blob/production/content/_redirects) in our GitHub repo.
Our primary method takes advantage of the [Pages platform](/pages/configuration/redirects/), defining redirects in a [plain text file](https://github.com/cloudflare/cloudflare-docs/blob/production/public/_redirects) in our GitHub repo.

This setup allows us to use the same workflow for redirects as for any other documentation change. We implement a redirect in the same pull request as the content change and can test these changes in our preview branches.

Expand All @@ -33,7 +32,7 @@ Normally, bulk redirects only come up when another team is adding a large number

We use this method when the contributors are outside of our team and when the total number of redirects is so large that it would clutter our `_redirects` file and count against our [limit for Pages redirects](/pages/configuration/redirects/#surpass-_redirects-limits).

***
---

## When we add redirects

Expand All @@ -43,8 +42,8 @@ Our team adds redirects in two situations: during the course of normal content a

During normal content work, you want to add redirects when you do the following to a page:

* Change any part of the URL (filename, folder).
* Delete the page.
- Change any part of the URL (filename, folder).
- Delete the page.

We have some automation to help [flag needed redirects](/docs-guide/manage-content/automation/process/#contributor-resources).

Expand Down
5 changes: 2 additions & 3 deletions src/content/docs/durable-objects/platform/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ changelog_file_name:
- durable-objects
sidebar:
order: 4

---

import { ProductChangelog } from "~/components"
import { ProductChangelog } from "~/components";

{/* <!-- Actual content lives in /data/changelogs/durable-objects.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}
{/* <!-- Actual content lives in /src/content/changelogs/durable-objects.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}

<ProductChangelog />
8 changes: 3 additions & 5 deletions src/content/docs/fundamentals/api/reference/deprecations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@ changelog_file_name:
- api-deprecations
sidebar:
order: 5

---

import { ProductChangelog } from "~/components"
import { ProductChangelog } from "~/components";

{/* <!-- Actual content lives in /data/changelogs/api-deprecations.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}
{/* <!-- Actual content lives in /src/content/changelogs/api-deprecations.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}

Cloudflare occasionally makes updates to our APIs that result in behavior changes or deprecations. When this happens, we will communicate when the API will no longer be available and whether there will be a replacement.

:::note

Subscribe to all API deprecation posts via [RSS](/changelog/index.xml).
:::

<ProductChangelog />
<ProductChangelog />
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ sidebar:
head:
- tag: title
content: Changelog - Cloudflare Trace

---

import { ProductChangelog } from "~/components"
import { ProductChangelog } from "~/components";

{/* <!-- Actual content lives in /data/changelogs/trace.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}
{/* <!-- Actual content lives in /src/content/changelogs/trace.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}

<ProductChangelog />
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ sidebar:
hidden: true
head: []
description: Review recent changes to Cloudflare's Application Performance products.

---

{/* <!-- All changelog entries live in associated /data/changelogs/{productName}.yaml. This page needs to exist in order to house the associated RSS feed. --> */}
{/* <!-- All changelog entries live in associated /src/content/changelogs/{productName}.yaml. This page needs to exist in order to house the associated RSS feed. --> */}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ sidebar:
hidden: true
head: []
description: Review recent changes to Cloudflare's core platform.

---

{/* <!-- All changelog entries live in associated /data/changelogs/{productName}.yaml. This page needs to exist in order to house the associated RSS feed. --> */}
{/* <!-- All changelog entries live in associated /src/content/changelogs/{productName}.yaml. This page needs to exist in order to house the associated RSS feed. --> */}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ sidebar:
hidden: true
head: []
description: Review recent changes to Cloudflare's Application Security products.

---

{/* <!-- All changelog entries live in associated /data/changelogs/{productName}.yaml. This page needs to exist in order to house the associated RSS feed. --> */}
{/* <!-- All changelog entries live in associated /src/content/changelogs/{productName}.yaml. This page needs to exist in order to house the associated RSS feed. --> */}
5 changes: 2 additions & 3 deletions src/content/docs/hyperdrive/platform/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ changelog_file_name:
- hyperdrive
sidebar:
order: 4

---

import { ProductChangelog } from "~/components"
import { ProductChangelog } from "~/components";

{/* <!-- Actual content lives in /data/changelogs/hyperdrive.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}
{/* <!-- Actual content lives in /src/content/changelogs/hyperdrive.yaml. Update the file there for new entries to appear here. For more details, refer to https://developers.cloudflare.com/style-guide/documentation-content-strategy/content-types/changelog/#yaml-file --> */}

<ProductChangelog />
Loading

0 comments on commit dab00fe

Please sign in to comment.