From 919e22d99a6742448255c3ad9758d09a1bf26442 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 17 Feb 2023 12:20:15 -0500 Subject: [PATCH] Add a head bubbling example --- examples/head-bubbling/package.json | 15 +++++++++++++ .../head-bubbling/src/components/Post.astro | 14 ++++++++++++ examples/head-bubbling/src/env.d.ts | 1 + examples/head-bubbling/src/pages/index.astro | 22 +++++++++++++++++++ pnpm-lock.yaml | 6 +++++ 5 files changed, 58 insertions(+) create mode 100644 examples/head-bubbling/package.json create mode 100644 examples/head-bubbling/src/components/Post.astro create mode 100644 examples/head-bubbling/src/env.d.ts create mode 100644 examples/head-bubbling/src/pages/index.astro diff --git a/examples/head-bubbling/package.json b/examples/head-bubbling/package.json new file mode 100644 index 000000000..8ca87887b --- /dev/null +++ b/examples/head-bubbling/package.json @@ -0,0 +1,15 @@ +{ + "name": "@example/head-bubbling", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "astro dev", + "start": "astro dev", + "build": "astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "astro": "^2.0.11" + } +} diff --git a/examples/head-bubbling/src/components/Post.astro b/examples/head-bubbling/src/components/Post.astro new file mode 100644 index 000000000..e2a3e9afe --- /dev/null +++ b/examples/head-bubbling/src/components/Post.astro @@ -0,0 +1,14 @@ +--- +const title = 'Blog Post'; +const description = 'Some description'; +--- + + + + + + +
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eget commodo lacus. Sed hendrerit vel tortor in viverra. Praesent a lectus ex. Cras hendrerit ligula in sapien euismod maximus. Duis vel consectetur nibh, sed tempus est. Nullam sit amet iaculis nisl. Suspendisse efficitur libero eu magna varius faucibus a a nulla. Aliquam pretium diam ut bibendum convallis. Nullam vel mi nunc. Duis rutrum odio a magna posuere, in semper nisl dictum. Proin malesuada arcu in mi finibus, eget blandit urna varius. Ut pulvinar malesuada euismod.

+

Suspendisse sed erat neque. Donec est ante, venenatis ut urna a, efficitur finibus leo. Cras ut pellentesque mi. Sed non nunc tincidunt, euismod erat eu, fringilla augue. Nunc in sem a nisi luctus lacinia ut interdum turpis. Pellentesque at bibendum nunc. Etiam id felis in erat egestas ultrices. Proin cursus nulla et ligula elementum iaculis. Aenean volutpat ullamcorper purus, vitae elementum urna interdum at. Aenean ex elit, porta vitae dictum ac, mattis at justo. Aenean non augue tincidunt tellus aliquam condimentum. Nullam eu ante sed turpis lobortis iaculis.

+
diff --git a/examples/head-bubbling/src/env.d.ts b/examples/head-bubbling/src/env.d.ts new file mode 100644 index 000000000..8c34fb45e --- /dev/null +++ b/examples/head-bubbling/src/env.d.ts @@ -0,0 +1 @@ +/// \ No newline at end of file diff --git a/examples/head-bubbling/src/pages/index.astro b/examples/head-bubbling/src/pages/index.astro new file mode 100644 index 000000000..d0a4f7f8f --- /dev/null +++ b/examples/head-bubbling/src/pages/index.astro @@ -0,0 +1,22 @@ +--- +import Post from '../components/Post.astro'; +--- + + + Index page + + + +

My Site

+ + + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index de690d4b3..22ffe45b3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -243,6 +243,12 @@ importers: '@astrojs/node': link:../../packages/integrations/node astro: link:../../packages/astro + examples/head-bubbling: + specifiers: + astro: ^2.0.11 + dependencies: + astro: link:../../packages/astro + examples/integration: specifiers: astro: ^2.0.11