Skip to content

Commit

Permalink
📝 include blahg alt tags; shorter desc
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnath committed Apr 14, 2024
1 parent abd4494 commit 58bd492
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion workspaces/website/src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const SITE_TITLE = 'Scott Nath';
export const SITE_SUBTITLE = 'Frontend Architect';
export const ALT_TITLES = ['Solutions Architect', 'Software Architect', 'Full Stack Developer', 'DevOps Architect', 'Design Engineer', 'Senior Software Engineer', 'Design System Architect', 'Developer Advocate'];
export const SCOTT_SHORT_DESC = 'Scott Nath is a senior web developer and actor living in New York State';
export const SITE_DESCRIPTION = `${SCOTT_SHORT_DESC} with extensive experience creating UI development systems with a focus on where developers and designers collaborate. Alt job titles: ${ALT_TITLES.join(', ')}`;
export const SITE_DESCRIPTION = `${SCOTT_SHORT_DESC} with extensive experience creating full-stack apps and design systems.`;


// image must be in root of public folder
Expand Down
9 changes: 7 additions & 2 deletions workspaces/website/src/layouts/BlogPost.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getCollection } from 'astro:content';
import SiteWide from './SiteWide.astro';
import FormattedDate from '../components/FormattedDate.astro';
const { title, description, pubDate, updatedDate, heroImage, series, schemaType } = Astro.props;
const { title, description, pubDate, updatedDate, heroImage, heroImageDesc, series, schemaType } = Astro.props;
/**
* @todo add series after design launch
Expand All @@ -20,12 +20,17 @@ type Props = CollectionEntry<'blahg'>['data'];
const itemtype = `https://schema.org/${schemaType}`;
let heroImgAlt = heroImageDesc;
if (!heroImgAlt) {
heroImgAlt = `Header image for article '${title}'`
}
---

<SiteWide title={title} description={description} image={heroImage}>
<article class="blog-post" itemscope itemtype={itemtype}>
<header>
{heroImage && <img width="100%" height="auto" src={heroImage} alt="" />}
{heroImage && <img width="100%" height="auto" src={heroImage} alt={heroImgAlt} />}
<h1 class="title" itemprop="name">{title}</h1>
<p itemprop="description">{description}</p>
<dl class="article-dates">
Expand Down

0 comments on commit 58bd492

Please sign in to comment.