diff --git a/docs/_meta.json b/docs/_meta.json index bd4ac0015..4db5d4ac9 100644 --- a/docs/_meta.json +++ b/docs/_meta.json @@ -1,6 +1,6 @@ { "index": "What is Bref and serverless?", - "cost-calculator": "Costs calculator", + "costs-calculator": "Costs calculator", "-- Getting started": { "type": "separator", "title": "Getting started" diff --git a/docs/cost-calculator.mdx b/docs/costs-calculator.mdx similarity index 100% rename from docs/cost-calculator.mdx rename to docs/costs-calculator.mdx diff --git a/docs/deploy/docker.mdx b/docs/deploy/docker.mdx index 91f07a187..7d09a5492 100644 --- a/docs/deploy/docker.mdx +++ b/docs/deploy/docker.mdx @@ -50,7 +50,7 @@ Bref offers the following base images: - `bref/php-xx-fpm:2`: PHP-FPM to run HTTP applications - `bref/php-xx-console:2`: to run PHP CLI commands -- `bref/php-xx:2`: to run [PHP functions](../functions/README.md) +- `bref/php-xx:2`: to run [PHP functions](../runtimes/function.mdx) ### Extra PHP extensions diff --git a/docs/index.md b/docs/index.md index 5bfc2f7f2..f5f2d734c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -70,7 +70,7 @@ Bref and AWS Lambda can be used to run many kind of PHP application, for example Bref aims to support any PHP framework as well. -If you are interested in real-world examples as well as cost analyses head over to the [**Case Studies** page](case-studies.md). +If you are interested in real-world examples as well as cost analyses head over to the [**Case Studies** page](/docs/case-studies.md). ## Maturity matrix @@ -170,7 +170,7 @@ This matrix will be updated as Bref and AWS services evolve over time. - **Website** - Websites can run on AWS Lambda. Assets can be stored in S3 and served via Cloudfront. This is documented in the ["Websites" documentation](/docs/web-apps/website-assets.md). Performance is as good as any server. + Websites can run on AWS Lambda. Assets can be stored in S3 and served via Cloudfront. This is documented in the ["Websites" documentation](/docs/use-cases/websites.mdx). Performance is as good as any server. - **Legacy application** @@ -180,4 +180,4 @@ This matrix will be updated as Bref and AWS services evolve over time. ## Getting started -Get started with Bref by reading the [installation documentation](setup.mdx). +Get started with Bref by reading the [installation documentation](/docs/setup.mdx). diff --git a/docs/laravel/getting-started.mdx b/docs/laravel/getting-started.mdx index 233908d3d..eafecfd9c 100644 --- a/docs/laravel/getting-started.mdx +++ b/docs/laravel/getting-started.mdx @@ -12,7 +12,7 @@ This guide helps you run Laravel applications on AWS Lambda using Bref. These in ## Setup -First, **follow the [Setup guide](../setup.md)** to create an AWS account and install the necessary tools. +First, **follow the [Setup guide](../setup.mdx)** to create an AWS account and install the necessary tools. Next, in an existing Laravel project, install Bref and the [Laravel-Bref package](https://github.com/brefphp/laravel-bridge). diff --git a/docs/setup.mdx b/docs/setup.mdx index c2b70a325..e8a69a763 100644 --- a/docs/setup.mdx +++ b/docs/setup.mdx @@ -35,7 +35,7 @@ To use Bref, you will need an AWS account and the `serverless` CLI. Let's get st If you have already set up AWS credentials on your machine (for example if you use the `aws` CLI), you can skip this step. - - [Create AWS access keys](/docs/setup/aws-keys.mdx) + - [Create AWS access keys](./setup/aws-keys.mdx) - Set up those keys by running: diff --git a/docs/symfony/getting-started.mdx b/docs/symfony/getting-started.mdx index fba269ee7..c025f3fe3 100644 --- a/docs/symfony/getting-started.mdx +++ b/docs/symfony/getting-started.mdx @@ -12,7 +12,7 @@ This guide helps you run Symfony applications on AWS Lambda using Bref. These in ## Setup -First, **follow the [Setup guide](../setup.md)** to create an AWS account and install the necessary tools. +First, **follow the [Setup guide](../setup.mdx)** to create an AWS account and install the necessary tools. Next, in an existing Symfony project, install Bref and the [Symfony Bridge package](https://github.com/brefphp/symfony-bridge). diff --git a/docs/use-cases/http/binary-requests-responses.mdx b/docs/use-cases/http/binary-requests-responses.mdx index c9f466dfc..d8e456a1c 100644 --- a/docs/use-cases/http/binary-requests-responses.mdx +++ b/docs/use-cases/http/binary-requests-responses.mdx @@ -5,7 +5,7 @@ import { Callout } from 'nextra/components'; AWS Lambda is only used for executing code. Serving assets via PHP does not make sense as this would be a waste of resources and money. - Deploying a website with assets (e.g. CSS, JavaScript, images) is covered in [the "Websites" documentation](./websites.md). + Deploying a website with assets (e.g. CSS, JavaScript, images) is covered in [the "Websites" documentation](../websites.mdx). In some cases however, you want to serve images (or other assets) via PHP. One example would be if you served generated images or PDFs via PHP. diff --git a/website/Makefile b/website/Makefile index 1a1b00f66..8b3423f82 100644 --- a/website/Makefile +++ b/website/Makefile @@ -17,4 +17,4 @@ node_modules: npm install check-links: - node link-checker/index.js https://website-v3--bref-website-v2.netlify.app/docs + node link-checker/index.js https://bref-website.vercel.app/ diff --git a/website/link-checker/index.js b/website/link-checker/index.js index d46d3fb7b..5185d0791 100644 --- a/website/link-checker/index.js +++ b/website/link-checker/index.js @@ -41,6 +41,14 @@ async function scan(stdout, url, links, brokenLinks, pageCache) { const urlWithoutAnchor = url.split('#')[0]; if (pageCache[urlWithoutAnchor] === undefined) { const response = await fetch(url); + // Ignore redirects to other domains (e.g. https://bref.sh/slack) + const originalDomain = new URL(url).hostname; + const finalDomain = new URL(response.url).hostname; + if (finalDomain !== originalDomain) { + console.log(`Ignoring ${url} redirecting to ${response.url}`); + pageCache[urlWithoutAnchor] = false; + return; + } if (! response.ok) { pageCache[urlWithoutAnchor] = false; } else { @@ -80,6 +88,7 @@ async function scan(stdout, url, links, brokenLinks, pageCache) { // Ignore already scanned links return; } + stdout.write(`Found new link ${newLink} on ${url}\n`); links[newLink] = false; } },