0
Fork 0
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:
AsyncBanana 2021-10-18 08:28:32 -04:00 committed by GitHub
parent 483ae6bf60
commit 9d9fe1527b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 10 additions and 9 deletions

View file

@ -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} />}

View file

@ -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.

View file

@ -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:

View file

@ -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:

View file

@ -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 Astros **new WASM compiler** (written in Go) that runs anywhere and can rebuild files in an instant.

View file

@ -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:

View file

@ -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*.

View file

@ -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