From 6d06fce6d2f47ee793b98b970212b27e8dc059f2 Mon Sep 17 00:00:00 2001 From: Caleb Jasik Date: Fri, 16 Jul 2021 06:01:31 -0500 Subject: [PATCH] Update docs in compiler messages (#710) * `github.com/snowpackjs/astro/blob/main/docs/*.md` -> `docs.astro.build/*/` * convert links to docs site links * Fix broken links that didn't work w/ the regex. * Add changeset * Delete five-weeks-destroy.md Co-authored-by: Fred K. Schott --- .changeset/fair-flowers-sleep.md | 2 +- .../src/pages/index.astro | 2 +- examples/blog/src/pages/index.astro | 2 +- examples/docs/src/layouts/Main.astro | 2 +- examples/docs/src/pages/getting-started.md | 22 +++++++++---------- .../framework-multiple/src/pages/index.astro | 2 +- .../framework-preact/src/pages/index.astro | 2 +- .../framework-react/src/pages/index.astro | 2 +- .../framework-svelte/src/pages/index.astro | 2 +- examples/framework-vue/src/pages/index.astro | 2 +- examples/portfolio/src/pages/index.astro | 2 +- examples/starter/src/pages/index.astro | 4 ++-- examples/with-markdown/src/pages/index.astro | 2 +- .../with-nanostores/src/pages/index.astro | 2 +- .../with-tailwindcss/src/pages/index.astro | 2 +- packages/astro-parser/CHANGELOG.md | 2 +- packages/astro/CHANGELOG.md | 8 +++---- packages/astro/src/runtime.ts | 2 +- packages/astro/test/react-component.test.js | 2 +- 19 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.changeset/fair-flowers-sleep.md b/.changeset/fair-flowers-sleep.md index ef6b8db43..3df51ba94 100644 --- a/.changeset/fair-flowers-sleep.md +++ b/.changeset/fair-flowers-sleep.md @@ -4,4 +4,4 @@ Improve slot support, adding support for named slots and fallback content within `slot` elements. -See the new [Slots documentation](https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md#slots) for more information. +See the new [Slots documentation](https://docs.astro.build/core-concepts/astro-components/#slots) for more information. diff --git a/examples/blog-multiple-authors/src/pages/index.astro b/examples/blog-multiple-authors/src/pages/index.astro index f8728f542..e3e86e1da 100644 --- a/examples/blog-multiple-authors/src/pages/index.astro +++ b/examples/blog-multiple-authors/src/pages/index.astro @@ -19,7 +19,7 @@ allPosts.sort((a, b) => new Date(b.date) - new Date(a.date)); let firstPage = allPosts.slice(0, 2); // Full Astro Component Syntax: -// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md +// https://docs.astro.build/core-concepts/astro-components/ --- diff --git a/examples/blog/src/pages/index.astro b/examples/blog/src/pages/index.astro index 017daa54a..0ba813eb5 100644 --- a/examples/blog/src/pages/index.astro +++ b/examples/blog/src/pages/index.astro @@ -17,7 +17,7 @@ let allPosts = Astro.fetchContent('./posts/*.md'); allPosts = allPosts.sort((a, b) => new Date(b.publishDate) - new Date(a.publishDate)); // Full Astro Component Syntax: -// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md +// https://docs.astro.build/core-concepts/astro-components/ --- diff --git a/examples/docs/src/layouts/Main.astro b/examples/docs/src/layouts/Main.astro index fe847496e..ffc94e374 100644 --- a/examples/docs/src/layouts/Main.astro +++ b/examples/docs/src/layouts/Main.astro @@ -16,7 +16,7 @@ const currentFile = currentPage === '/' ? 'src/pages/index.md' : `src/pages${cur const githubEditUrl = `https://github.com/USER/REPO/blob/main/${currentFile}` // Full Astro Component Syntax: -// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md +// https://docs.astro.build/core-concepts/astro-components/ --- diff --git a/examples/docs/src/pages/getting-started.md b/examples/docs/src/pages/getting-started.md index eb2826dbc..ab9c79617 100644 --- a/examples/docs/src/pages/getting-started.md +++ b/examples/docs/src/pages/getting-started.md @@ -46,14 +46,14 @@ The `src/components/ThemeToggle.tsx` is only responsible for applying the theme, For more information on how to use Astro components, check the documentation pages: -- [General Instructions](https://github.com/snowpackjs/astro#readme) -- [astro.config.mjs](https://github.com/snowpackjs/astro/blob/main/docs/config.md) -- [API](https://github.com/snowpackjs/astro/blob/main/docs/api.md) -- [Command Line Interface](https://github.com/snowpackjs/astro/blob/main/docs/cli.md) -- [Collections](https://github.com/snowpackjs/astro/blob/main/docs/collections.md) -- [Development Server](https://github.com/snowpackjs/astro/blob/main/docs/dev.md) -- [Markdown](https://github.com/snowpackjs/astro/blob/main/docs/markdown.md) -- [Publishing Astro components](https://github.com/snowpackjs/astro/blob/main/docs/publishing.md) -- [Renderers](https://github.com/snowpackjs/astro/blob/main/docs/renderers.md) -- [Styling](https://github.com/snowpackjs/astro/blob/main/docs/styling.md) -- [.astro Syntax](https://github.com/snowpackjs/astro/blob/main/docs/syntax.md) +- [Quick Start](https://docs.astro.build/quick-start) +- [astro.config.mjs](https://docs.astro.build/reference/configuration-reference) +- [API](https://docs.astro.build/reference/api-reference) +- [Command Line Interface](https://docs.astro.build/reference/cli-reference) +- [Collections](https://docs.astro.build/core-concepts/collections) +- [Development Server](https://docs.astro.build/reference/dev/) +- [Markdown](https://docs.astro.build/guides/markdown-content) +- [Publishing Astro components](https://docs.astro.build/guides/publish-to-npm) +- [Renderers](https://docs.astro.build/reference/renderer-reference) +- [Styling](https://docs.astro.build/guides/styling) +- [.astro Syntax](https://docs.astro.build/core-concepts/astro-components) diff --git a/examples/framework-multiple/src/pages/index.astro b/examples/framework-multiple/src/pages/index.astro index 706e4863f..c49744b18 100644 --- a/examples/framework-multiple/src/pages/index.astro +++ b/examples/framework-multiple/src/pages/index.astro @@ -8,7 +8,7 @@ import SvelteCounter from '../components/SvelteCounter.svelte'; // Full Astro Component Syntax: -// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md +// https://docs.astro.build/core-concepts/astro-components/ --- diff --git a/examples/framework-preact/src/pages/index.astro b/examples/framework-preact/src/pages/index.astro index ed42e72fd..2d2a15f6b 100644 --- a/examples/framework-preact/src/pages/index.astro +++ b/examples/framework-preact/src/pages/index.astro @@ -4,7 +4,7 @@ import Counter from '../components/Counter.jsx' // Full Astro Component Syntax: -// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md +// https://docs.astro.build/core-concepts/astro-components/ --- diff --git a/examples/framework-react/src/pages/index.astro b/examples/framework-react/src/pages/index.astro index 35270638c..851eb6e78 100644 --- a/examples/framework-react/src/pages/index.astro +++ b/examples/framework-react/src/pages/index.astro @@ -4,7 +4,7 @@ import Counter from '../components/Counter.jsx' // Full Astro Component Syntax: -// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md +// https://docs.astro.build/core-concepts/astro-components/ --- diff --git a/examples/framework-svelte/src/pages/index.astro b/examples/framework-svelte/src/pages/index.astro index 620510bd0..194e5bfeb 100644 --- a/examples/framework-svelte/src/pages/index.astro +++ b/examples/framework-svelte/src/pages/index.astro @@ -4,7 +4,7 @@ import Counter from '../components/Counter.svelte' // Full Astro Component Syntax: -// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md +// https://docs.astro.build/core-concepts/astro-components/ --- diff --git a/examples/framework-vue/src/pages/index.astro b/examples/framework-vue/src/pages/index.astro index 0f89f6047..6001e20e9 100644 --- a/examples/framework-vue/src/pages/index.astro +++ b/examples/framework-vue/src/pages/index.astro @@ -4,7 +4,7 @@ import Counter from '../components/Counter.vue' // Full Astro Component Syntax: -// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md +// https://docs.astro.build/core-concepts/astro-components/ --- diff --git a/examples/portfolio/src/pages/index.astro b/examples/portfolio/src/pages/index.astro index 2d0f8a0a1..dbf6a9486 100644 --- a/examples/portfolio/src/pages/index.astro +++ b/examples/portfolio/src/pages/index.astro @@ -11,7 +11,7 @@ const projects = Astro.fetchContent('./project/**/*.md'); const featuredProject = projects[0]; // Full Astro Component Syntax: -// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md +// https://docs.astro.build/core-concepts/astro-components/ --- diff --git a/examples/starter/src/pages/index.astro b/examples/starter/src/pages/index.astro index 2e5832a3f..30a28212a 100644 --- a/examples/starter/src/pages/index.astro +++ b/examples/starter/src/pages/index.astro @@ -11,7 +11,7 @@ import Tour from '../components/Tour.astro'; let title = 'My Astro Site'; // Full Astro Component Syntax: -// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md +// https://docs.astro.build/core-concepts/astro-components/ --- @@ -48,7 +48,7 @@ let title = 'My Astro Site'; - Note: by default, these components are NOT interactive on the client. - The `:visible` directive tells Astro to make it interactive. - - - See https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/component-hydration.md + - See https://docs.astro.build/core-concepts/component-hydration/ --> diff --git a/examples/with-markdown/src/pages/index.astro b/examples/with-markdown/src/pages/index.astro index b6843f3a5..de6f32303 100644 --- a/examples/with-markdown/src/pages/index.astro +++ b/examples/with-markdown/src/pages/index.astro @@ -16,7 +16,7 @@ const variable = 'content'; const items = ['A', 'B', 'C']; // Full Astro Component Syntax: -// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md +// https://docs.astro.build/core-concepts/astro-components/ --- diff --git a/examples/with-nanostores/src/pages/index.astro b/examples/with-nanostores/src/pages/index.astro index a3f0c7c8c..94afa8b0a 100644 --- a/examples/with-nanostores/src/pages/index.astro +++ b/examples/with-nanostores/src/pages/index.astro @@ -6,7 +6,7 @@ import AdminsVue from '../components/AdminsVue.vue'; import AdminsPreact from '../components/AdminsPreact.jsx'; // Full Astro Component Syntax: -// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md +// https://docs.astro.build/core-concepts/astro-components/ --- diff --git a/examples/with-tailwindcss/src/pages/index.astro b/examples/with-tailwindcss/src/pages/index.astro index 09891eed3..d70b3457b 100644 --- a/examples/with-tailwindcss/src/pages/index.astro +++ b/examples/with-tailwindcss/src/pages/index.astro @@ -3,7 +3,7 @@ import Button from '../components/Button.astro'; // Full Astro Component Syntax: -// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md +// https://docs.astro.build/core-concepts/astro-components/ --- diff --git a/packages/astro-parser/CHANGELOG.md b/packages/astro-parser/CHANGELOG.md index 77caf285f..3f4fca4b1 100644 --- a/packages/astro-parser/CHANGELOG.md +++ b/packages/astro-parser/CHANGELOG.md @@ -66,4 +66,4 @@ - b3886c2: Enhanced **Markdown** support! Markdown processing has been moved from `micromark` to `remark` to prepare Astro for user-provided `remark` plugins _in the future_. - This change also introduces a built-in `` component for embedding Markdown and any Astro-supported component format inside of `.astro` files. [Read more about Astro's Markdown support.](https://github.com/snowpackjs/astro/blob/main/docs/markdown.md) + This change also introduces a built-in `` component for embedding Markdown and any Astro-supported component format inside of `.astro` files. [Read more about Astro's Markdown support.](https://docs.astro.build/markdown/) diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 70f12bc6e..0201fd0e9 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -46,7 +46,7 @@ - 8f4562a: Improve slot support, adding support for named slots and fallback content within `slot` elements. - See the new [Slots documentation](https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md#slots) for more information. + See the new [Slots documentation](https://docs.astro.build/core-concepts/astro-components/#slots) for more information. - 9859f53: Correcting typo in ReadMe @@ -211,7 +211,7 @@
{text}
``` - [Read more about the `.astro` syntax](https://github.com/snowpackjs/astro/blob/main/docs/syntax.md#data-and-props) + [Read more about the `.astro` syntax](https://docs.astro.build/syntax/#data-and-props) *** @@ -439,7 +439,7 @@ _Rolling back to 0.13.10 to prevent a regression in the dev server output._ ### Patch Changes - 0d6afae: Fixes a few small bugs with the `Markdown` component when there are multiple instances on the same page -- 1d930ff: Adds [`--verbose`](https://github.com/snowpackjs/astro/blob/main/docs/cli.md#--verbose) and [`--reload`](https://github.com/snowpackjs/astro/blob/main/docs/cli.md#--reload) flags to the `astro` CLI. +- 1d930ff: Adds [`--verbose`](https://docs.astro.build/cli.md#--verbose) and [`--reload`](https://github.com/snowpackjs/astro/blob/main/docs/cli/#--reload) flags to the `astro` CLI. ## 0.12.3 @@ -566,7 +566,7 @@ _Rolling back to 0.13.10 to prevent a regression in the dev server output._ - b3886c2: Enhanced **Markdown** support! Markdown processing has been moved from `micromark` to `remark` to prepare Astro for user-provided `remark` plugins _in the future_. - This change also introduces a built-in `` component for embedding Markdown and any Astro-supported component format inside of `.astro` files. [Read more about Astro's Markdown support.](https://github.com/snowpackjs/astro/blob/main/docs/markdown.md) + This change also introduces a built-in `` component for embedding Markdown and any Astro-supported component format inside of `.astro` files. [Read more about Astro's Markdown support.](https://docs.astro.build/markdown/) ### Patch Changes diff --git a/packages/astro/src/runtime.ts b/packages/astro/src/runtime.ts index 545c2f7b7..2bcc9316b 100644 --- a/packages/astro/src/runtime.ts +++ b/packages/astro/src/runtime.ts @@ -264,7 +264,7 @@ async function load(config: RuntimeConfig, rawPathname: string | undefined): Pro `[${reqPath}] The window object is not available during server-side rendering (SSR). Try using \`import.meta.env.SSR\` to write SSR-friendly code. - https://github.com/snowpackjs/astro/blob/main/docs/reference/api-reference.md#importmeta` + https://docs.astro.build/reference/api-reference/#importmeta` ), }; } diff --git a/packages/astro/test/react-component.test.js b/packages/astro/test/react-component.test.js index ac80b3b6d..aa196fdfb 100644 --- a/packages/astro/test/react-component.test.js +++ b/packages/astro/test/react-component.test.js @@ -60,7 +60,7 @@ React('Throws helpful error message on window SSR', async () => { `[/window] The window object is not available during server-side rendering (SSR). Try using \`import.meta.env.SSR\` to write SSR-friendly code. - https://github.com/snowpackjs/astro/blob/main/docs/reference/api-reference.md#importmeta` + https://docs.astro.build/reference/api-reference/#importmeta` ); });