Site improvments #1

Merged
smjklake merged 5 commits from site-improvments into main 2024-11-13 08:12:20 -07:00
7 changed files with 673 additions and 909 deletions

1333
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,7 @@
"@astrojs/mdx": "^2.0.1", "@astrojs/mdx": "^2.0.1",
"@astrojs/rss": "^4.0.1", "@astrojs/rss": "^4.0.1",
"@astrojs/sitemap": "^3.0.3", "@astrojs/sitemap": "^3.0.3",
"astro": "^4.14.3", "astro": "^4.16.10",
"typescript": "^5.3.3" "typescript": "^5.3.3"
}, },
"devDependencies": { "devDependencies": {

View File

@@ -45,3 +45,6 @@ const { title, description, image = '/west-wing-sunrise.jpg' } = Astro.props;
<meta property="twitter:title" content={title} /> <meta property="twitter:title" content={title} />
<meta property="twitter:description" content={description} /> <meta property="twitter:description" content={description} />
<meta property="twitter:image" content={new URL(image, Astro.url)} /> <meta property="twitter:image" content={new URL(image, Astro.url)} />
<!-- Umami --->
<script is:inline src="https://cloud.umami.is/script.js" data-website-id="e7534182-fa03-41a0-8b35-07ff7f5d25e4"></script>

View File

@@ -34,6 +34,20 @@ const today = new Date();
></path> ></path>
</svg> </svg>
</a> </a>
<a href="https://bsky.app/profile/smrising.com" target="_blank">
<span class="sr-only">Follow me on Bluesky</span>
<svg
aria-hidden="true"
viewBox="0 0 320 286"
width="32"
height="32"
astro-icon="social/bluesky"
>
<path
d="M69.364 19.146c36.687 27.806 76.147 84.186 90.636 114.439 14.489-30.253 53.948-86.633 90.636-114.439C277.107-.917 320-16.44 320 32.957c0 9.865-5.603 82.875-8.889 94.729-11.423 41.208-53.045 51.719-90.071 45.357 64.719 11.12 81.182 47.953 45.627 84.785-80 82.874-106.667-44.333-106.667-44.333s-26.667 127.207-106.667 44.333c-35.555-36.832-19.092-73.665 45.627-84.785-37.026 6.362-78.648-4.149-90.071-45.357C5.603 115.832 0 42.822 0 32.957 0-16.44 42.893-.917 69.364 19.147Z"
fill="currentColor"></path>
</svg>
</a>
<a href="https://github.com/smjklake" target="_blank"> <a href="https://github.com/smjklake" target="_blank">
<span class="sr-only">Go to my GitHub repo</span> <span class="sr-only">Go to my GitHub repo</span>
<svg <svg

View File

@@ -1,7 +1,7 @@
--- ---
title: 'First post' title: 'First post'
description: 'First ever blog post' description: 'First ever blog post'
pubDate: 'Dec 19 2024' pubDate: 'Dec 19 2023'
heroImage: '/west-wing-sunrise.jpg' heroImage: '/west-wing-sunrise.jpg'
--- ---

View File

@@ -1,13 +1,14 @@
--- ---
import BaseHead from '../../components/BaseHead.astro'; import BaseHead from "../../components/BaseHead.astro";
import Header from '../../components/Header.astro'; import Header from "../../components/Header.astro";
import Footer from '../../components/Footer.astro'; import Footer from "../../components/Footer.astro";
import { SITE_TITLE, SITE_DESCRIPTION } from '../../consts'; import { SITE_TITLE, SITE_DESCRIPTION } from "../../consts";
import { getCollection } from 'astro:content'; import { getCollection } from "astro:content";
import FormattedDate from '../../components/FormattedDate.astro'; import FormattedDate from "../../components/FormattedDate.astro";
import { Image } from "astro:assets";
const posts = (await getCollection('blog')).sort( const posts = (await getCollection("blog")).sort((a, b) =>
(a, b) => a.data.pubDate.valueOf() - b.data.pubDate.valueOf() a.data.pubDate.valueOf() < b.data.pubDate.valueOf() ? 1 : -1,
); );
--- ---
@@ -94,10 +95,19 @@ const posts = (await getCollection('blog')).sort(
posts.map((post) => ( posts.map((post) => (
<li> <li>
<a href={`/blog/${post.slug}/`}> <a href={`/blog/${post.slug}/`}>
<img width={720} height={360} src={post.data.heroImage} alt="" /> {post.data.heroImage &&
<Image
width={720}
height={360}
src={post.data.heroImage}
loading=eager
alt=""
/>}
<h4 class="title">{post.data.title}</h4> <h4 class="title">{post.data.title}</h4>
<p class="date"> <p class="date">
<FormattedDate date={post.data.pubDate} /> <FormattedDate
date={post.data.pubDate}
/>
</p> </p>
</a> </a>
</li> </li>

View File

@@ -3,6 +3,8 @@ import BaseHead from "../components/BaseHead.astro";
import Header from "../components/Header.astro"; import Header from "../components/Header.astro";
import Footer from "../components/Footer.astro"; import Footer from "../components/Footer.astro";
import { SITE_TITLE, SITE_DESCRIPTION } from "../consts"; import { SITE_TITLE, SITE_DESCRIPTION } from "../consts";
import { Image } from "astro:assets";
import profilePic from "../../public/profile-pic.jpg";
--- ---
<!doctype html> <!doctype html>
@@ -15,9 +17,9 @@ import { SITE_TITLE, SITE_DESCRIPTION } from "../consts";
<main> <main>
<h1>Hello</h1> <h1>Hello</h1>
<article> <article>
<img <Image
src="/profile-pic.jpg" src={profilePic}
width="250px" width={250}
alt="A man with short, dark, wavy hair and a beard is looking at the camera. He is wearing a gray shirt and standing against a plain background." alt="A man with short, dark, wavy hair and a beard is looking at the camera. He is wearing a gray shirt and standing against a plain background."
/> />
<p> <p>
@@ -26,9 +28,7 @@ import { SITE_TITLE, SITE_DESCRIPTION } from "../consts";
I was in the US Air Force for a large portion of my life as I was in the US Air Force for a large portion of my life as
a Jet Engine Mechanic and have transitioned into Software a Jet Engine Mechanic and have transitioned into Software
Development after separating. I enjoy running, cycling, and Development after separating. I enjoy running, cycling, and
rock climbing as well as exploring technology. I am a rock climbing as well as exploring technology.
motivated lifelong learner and eager to share what I've
learned.
</p> </p>
</article> </article>
</main> </main>