From bcc617f9dc560bd61535c136297e97fb11013d6f Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Tue, 18 Jan 2022 08:34:12 -0500 Subject: [PATCH] Update examples to move away from Astro.resolve on styles (#2393) * Update examples to move away from Astro.resolve on styles * Prepend the subpath * Adds a changeset * Switch to @import for the starter --- .changeset/flat-tips-happen.md | 5 +++++ .../blog-multiple-authors/src/components/MainHead.astro | 4 +++- examples/docs/src/components/HeadCommon.astro | 8 +++++--- examples/framework-multiple/src/pages/index.astro | 4 +++- examples/starter/src/pages/index.astro | 6 ++++-- examples/with-markdown-plugins/src/layouts/main.astro | 4 +++- examples/with-markdown/src/layouts/main.astro | 4 +++- examples/with-nanostores/src/pages/index.astro | 6 ++++-- packages/astro/src/core/build/static-build.ts | 3 ++- 9 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 .changeset/flat-tips-happen.md diff --git a/.changeset/flat-tips-happen.md b/.changeset/flat-tips-happen.md new file mode 100644 index 000000000..c97978037 --- /dev/null +++ b/.changeset/flat-tips-happen.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Prepends site subpath when using --experimental-static-build diff --git a/examples/blog-multiple-authors/src/components/MainHead.astro b/examples/blog-multiple-authors/src/components/MainHead.astro index ffdc0f1c7..81fad3672 100644 --- a/examples/blog-multiple-authors/src/components/MainHead.astro +++ b/examples/blog-multiple-authors/src/components/MainHead.astro @@ -18,7 +18,9 @@ const { title, description, image, type, next, prev, canonicalURL } = Astro.prop - + diff --git a/examples/docs/src/components/HeadCommon.astro b/examples/docs/src/components/HeadCommon.astro index 289aa23aa..2902da5a3 100644 --- a/examples/docs/src/components/HeadCommon.astro +++ b/examples/docs/src/components/HeadCommon.astro @@ -8,9 +8,11 @@ - - - + diff --git a/examples/framework-multiple/src/pages/index.astro b/examples/framework-multiple/src/pages/index.astro index 3864b6430..917f604a2 100644 --- a/examples/framework-multiple/src/pages/index.astro +++ b/examples/framework-multiple/src/pages/index.astro @@ -17,7 +17,9 @@ import SvelteCounter from '../components/SvelteCounter.svelte'; - +
diff --git a/examples/starter/src/pages/index.astro b/examples/starter/src/pages/index.astro index 85c0f6e0d..859ebb205 100644 --- a/examples/starter/src/pages/index.astro +++ b/examples/starter/src/pages/index.astro @@ -20,8 +20,10 @@ let title = 'My Astro Site'; {title} - - + diff --git a/examples/with-nanostores/src/pages/index.astro b/examples/with-nanostores/src/pages/index.astro index e25769138..424384933 100644 --- a/examples/with-nanostores/src/pages/index.astro +++ b/examples/with-nanostores/src/pages/index.astro @@ -18,8 +18,10 @@ import AdminsSolid from '../components/AdminsSolid.jsx'; - - +