diff options
author | 2022-01-14 12:11:56 -0500 | |
---|---|---|
committer | 2022-01-14 12:11:56 -0500 | |
commit | 92532b88820bc45f3f02bca0054e8433c3f7a743 (patch) | |
tree | 6e5c9ecaa9065ecbe7d77523b49100e700bb9e27 /examples/blog/src | |
parent | 0257419af8c8173e1742b338de462d44c0d78f90 (diff) | |
download | astro-92532b88820bc45f3f02bca0054e8433c3f7a743.tar.gz astro-92532b88820bc45f3f02bca0054e8433c3f7a743.tar.zst astro-92532b88820bc45f3f02bca0054e8433c3f7a743.zip |
Fixes for blog and docs examples (#2373)
* Fixes for blog and docs examples
* Adds a changeset
* Upgrade the compiler version
* Use a global style tag
* Skip on windows temporarily
Diffstat (limited to 'examples/blog/src')
-rw-r--r-- | examples/blog/src/components/BaseHead.astro | 5 | ||||
-rw-r--r-- | examples/blog/src/layouts/BlogPost.astro | 2 | ||||
-rw-r--r-- | examples/blog/src/pages/index.astro | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/examples/blog/src/components/BaseHead.astro b/examples/blog/src/components/BaseHead.astro index e5745e196..f39f77338 100644 --- a/examples/blog/src/components/BaseHead.astro +++ b/examples/blog/src/components/BaseHead.astro @@ -1,4 +1,6 @@ --- + + export interface Props { title: string; description: string; @@ -34,3 +36,6 @@ const { title, description, permalink } = Astro.props; <!-- Fonts --> <link rel="preconnect" href="https://fonts.gstatic.com" /> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&family=IBM+Plex+Sans:wght@400;700&display=swap" /> +<style global> + @import "../styles/blog.css"; +</style> diff --git a/examples/blog/src/layouts/BlogPost.astro b/examples/blog/src/layouts/BlogPost.astro index e6bb0a6c7..bf682b7ae 100644 --- a/examples/blog/src/layouts/BlogPost.astro +++ b/examples/blog/src/layouts/BlogPost.astro @@ -3,6 +3,7 @@ import BaseHead from '../components/BaseHead.astro'; import BlogHeader from '../components/BlogHeader.astro'; import BlogPost from '../components/BlogPost.astro'; + const { content } = Astro.props; const { title, description, publishDate, author, heroImage, permalink, alt } = content; --- @@ -10,7 +11,6 @@ const { title, description, publishDate, author, heroImage, permalink, alt } = c <html lang={content.lang || 'en'}> <head> <BaseHead {title} {description} {permalink} /> - <link rel="stylesheet" href={Astro.resolve('../styles/blog.css')} /> </head> <body> diff --git a/examples/blog/src/pages/index.astro b/examples/blog/src/pages/index.astro index 9a2178ed0..c7bc3ea32 100644 --- a/examples/blog/src/pages/index.astro +++ b/examples/blog/src/pages/index.astro @@ -28,7 +28,6 @@ allPosts = allPosts.sort((a, b) => new Date(b.publishDate).valueOf() - new Date( <html lang="en"> <head> <BaseHead {title} {description} {permalink} /> - <link rel="stylesheet" href={Astro.resolve('../styles/blog.css')} /> <style> header { |