mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Add image alts to blog posts (#1579)
* Added image alts to blog posts * Fixed netlify post tag
This commit is contained in:
parent
483ae6bf60
commit
9d9fe1527b
8 changed files with 10 additions and 9 deletions
|
@ -9,15 +9,16 @@ export interface Props {
|
|||
author?: string;
|
||||
publishDate: string;
|
||||
heroImage: string;
|
||||
heroImageAlt: string;
|
||||
}
|
||||
|
||||
const { title, author, publishDate, heroImage } = Astro.props;
|
||||
const { title, author, publishDate, heroImage, heroImageAlt } = Astro.props;
|
||||
---
|
||||
|
||||
<div class="layout">
|
||||
<article>
|
||||
<header>
|
||||
{heroImage && <img width="720" height="420" class="hero-image" loading="lazy" src={heroImage} />}
|
||||
{heroImage && <img width="720" height="420" class="hero-image" loading="lazy" src={heroImage} alt={heroImageAlt}/>}
|
||||
<p class="publish-date">{publishDate}</p>
|
||||
<h1 class="title">{title}</h1>
|
||||
{author && <Author authorId={author} />}
|
||||
|
|
|
@ -29,7 +29,7 @@ let lang = 'en';
|
|||
|
||||
<body>
|
||||
<BlogHeader />
|
||||
<BlogPost title={title} author={author} heroImage={heroImage} publishDate={publishDate}>
|
||||
<BlogPost title={title} author={author} heroImage={heroImage} publishDate={publishDate} heroImageAlt="Astro text on space background">
|
||||
<Markdown>
|
||||
A little over a month ago, the first public beta for Astro was released to the world. Since then, we have been fixing bugs and gathering your feedback on what to tackle next. Today, we are excited to announce the release of some of our most requested features.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ let lang = 'en';
|
|||
|
||||
<body>
|
||||
<BlogHeader />
|
||||
<BlogPost title={title} heroImage={heroImage} publishDate={publishDate}>
|
||||
<BlogPost title={title} heroImage={heroImage} publishDate={publishDate} heroImageAlt="Astro text on space background">
|
||||
<Markdown>
|
||||
We are excited to introduce Astro 0.19, featuring:
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ let lang = 'en';
|
|||
|
||||
<body>
|
||||
<BlogHeader />
|
||||
<BlogPost title={title} author="fred" heroImage="/assets/blog/astro-021-preview/hero.png" publishDate={publishDate}>
|
||||
<BlogPost title={title} author="fred" heroImage="/assets/blog/astro-021-preview/hero.png" publishDate={publishDate} heroImageAlt="Spacecraft overlooking Earth">
|
||||
<Markdown>
|
||||
Astro v0.21.0 will be our biggest release yet. At a high-level, it includes:
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ let lang = 'en';
|
|||
|
||||
<body>
|
||||
<BlogHeader />
|
||||
<BlogPost title={title} author="drew" heroImage="/assets/blog/astro-repl/astro-repl-hero.jpg" publishDate={publishDate}>
|
||||
<BlogPost title={title} author="drew" heroImage="/assets/blog/astro-repl/astro-repl-hero.jpg" publishDate={publishDate} heroImageAlt="Hills with stars above">
|
||||
<Markdown>
|
||||
The Astro team proudly presents the new [Astro REPL:](https://astro.build/play) compile Astro right in your browser. Use it to explore Astro's HTML-based component language, debug issues, or even prototype an entire webpage. It's powered by Astro’s **new WASM compiler** (written in Go) that runs anywhere and can rebuild files in an instant.
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ let lang = 'en';
|
|||
|
||||
<body>
|
||||
<BlogHeader />
|
||||
<BlogPost title={title} author="matthew" heroImage="/assets/blog/demo-day-2021-09/hero.png" publishDate={publishDate}>
|
||||
<BlogPost title={title} author="matthew" heroImage="/assets/blog/demo-day-2021-09/hero.png" publishDate={publishDate} heroImageAlt="Spacecraft overlooking Earth">
|
||||
<Markdown>
|
||||
**Astro Demo Day** was today! We had **4** amazing talks, including one big announcement on the future direction of Astro. If you missed the livestream, fear not! You can see the full event [on YouTube](https://www.youtube.com/watch?v=-ExcBJrXOd8) or watch the talks in any order by visiting the links below. Subscribe to the [Astro YouTube channel](https://www.youtube.com/channel/UCeFjmvZEK-MoefuYXptnX6A) to make sure you don't miss our next demo day. Today's demos were:
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ let lang = 'en';
|
|||
|
||||
<body>
|
||||
<BlogHeader />
|
||||
<BlogPost title={title} author={author} heroImage={heroImage} publishDate={publishDate}>
|
||||
<BlogPost title={title} author={author} heroImage={heroImage} publishDate={publishDate} heroImageAlt="Astro text on space background">
|
||||
<Markdown>
|
||||
There's a simple secret to building a faster website — *just ship less*.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ let lang = 'en';
|
|||
|
||||
<body>
|
||||
<BlogHeader />
|
||||
<BlogPost title={title} heroImage={heroImage} publishDate={publishDate}>
|
||||
<BlogPost title={title} heroImage={heroImage} publishDate={publishDate} heroImageAlt="Astro logo + Netlify logo on space background">
|
||||
<Markdown>
|
||||
|
||||
We are thrilled to announce that [Netlify](https://www.netlify.com/?utm_campaign=devex-jl&utm_source=astro&utm_medium=blog
|
||||
|
|
Loading…
Reference in a new issue