Compare commits

..

1 Commits

Author SHA1 Message Date
056b16b5cf chore(deps): update react monorepo to v19.2.4
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / build (pull_request) Successful in 4m2s
2026-01-28 00:05:31 +00:00
29 changed files with 2011 additions and 1569 deletions

View File

@@ -13,7 +13,7 @@ on:
jobs: jobs:
renovate: renovate:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: ghcr.io/renovatebot/renovate:43 container: ghcr.io/renovatebot/renovate:42
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v6

View File

@@ -1,5 +1,5 @@
ARG REGISTRY=docker.io ARG REGISTRY=docker.io
FROM ${REGISTRY}/node:24.13.0-alpine AS base FROM ${REGISTRY}/node:24.13.0-alpine3.22 AS base
ENV PNPM_HOME="/pnpm" ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH" ENV PATH="$PNPM_HOME:$PATH"
@@ -26,10 +26,10 @@ COPY --from=build /app/dist /app/dist
ENV HOST=0.0.0.0 ENV HOST=0.0.0.0
ENV SITE_URL=https://www.alexlebens.dev ENV SITE_URL=https://www.alexlebens.dev
ENV DIRECTUS_URL=https://directus.alexlebens.net ENV DIRECTUS_URL=https://directus.alexlebens.dev
ENV PORT=4321 ENV PORT=4321
LABEL version="2.5.0" LABEL version="2.2.1"
LABEL description="Astro based personal website" LABEL description="Astro based personal website"
EXPOSE $PORT EXPOSE $PORT

View File

@@ -2,19 +2,29 @@
Personal site used for information about myself and blog. Personal site used for information about myself and blog.
## Development ## Features
- 🐈 Simple And Beautiful
- 🖥️️ Responsive And Light/Dark mode
- 🐛 SiteMap & RSS Feed
- 🐝 Category Support
- 🐜 SEO and Responsiveness
- 🪲 Markdown And MDX
- 🏂🏾 Page Compression & Image Optimization
### Development Commands
With dependencies installed, you can utilize the following npm scripts to manage your project's development lifecycle: With dependencies installed, you can utilize the following npm scripts to manage your project's development lifecycle:
- `pnpm build`: Bundles your site into static files for production. - `pnpm run dev`: Starts a local development server with hot reloading enabled.
- `pnpm dev`: Starts a local development server with hot reloading enabled. - `pnpm run preview`: Serves your build output locally for preview before deployment.
- `pnpm preview`: Serves your build output locally for preview before deployment. - `pnpm run build`: Bundles your site into static files for production.
For detailed help with Astro CLI commands, visit [Astro's documentation](https://docs.astro.build/en/reference/cli-reference/). For detailed help with Astro CLI commands, visit [Astro's documentation](https://docs.astro.build/en/reference/cli-reference/).
## Thanks ## Thanks
Thanks https://github.com/godruoyi/gblog/tree/gblog-template, https://github.com/mearashadowfax/ScrewFast, Thanks https://github.com/mearashadowfax/ScrewFast, https://github.com/godruoyi/gblog/tree/gblog-template
## License ## License

View File

@@ -1,5 +1,6 @@
import { defineConfig } from 'astro/config'; import { defineConfig, passthroughImageService, sharpImageService } from 'astro/config';
import mdx from '@astrojs/mdx';
import node from '@astrojs/node'; import node from '@astrojs/node';
import partytown from '@astrojs/partytown'; import partytown from '@astrojs/partytown';
import react from '@astrojs/react'; import react from '@astrojs/react';
@@ -8,6 +9,8 @@ import sitemap from '@astrojs/sitemap';
import tailwindcss from '@tailwindcss/vite'; import tailwindcss from '@tailwindcss/vite';
import icon from 'astro-icon'; import icon from 'astro-icon';
import swup from '@swup/astro'; import swup from '@swup/astro';
import rehypePrettyCode from 'rehype-pretty-code';
import { transformerCopyButton } from '@rehype-pretty/transformers';
const getSiteURL = () => { const getSiteURL = () => {
if (process.env.SITE_URL) { if (process.env.SITE_URL) {
@@ -28,6 +31,7 @@ export default defineConfig({
prefetch: true, prefetch: true,
integrations: [ integrations: [
mdx(),
partytown(), partytown(),
react(), react(),
sitemap(), sitemap(),
@@ -63,6 +67,24 @@ export default defineConfig({
markdown: { markdown: {
syntaxHighlight: false, syntaxHighlight: false,
rehypePlugins: [
[
rehypePrettyCode,
{
theme: {
light: 'github-light',
dark: 'github-dark-dimmed',
},
keepBackground: false,
transformers: [
transformerCopyButton({
visibility: 'always',
feedbackDuration: 2500,
}),
],
},
],
],
}, },
plugins: { plugins: {

View File

@@ -1,7 +1,7 @@
{ {
"name": "site-profile", "name": "site-profile",
"type": "module", "type": "module",
"version": "2.5.0", "version": "2.2.1",
"homepage": "https://www.alexlebens.dev", "homepage": "https://www.alexlebens.dev",
"bugs": { "bugs": {
"url": "https://gitea.alexlebens.dev/alexlebens/site-profile/issues", "url": "https://gitea.alexlebens.dev/alexlebens/site-profile/issues",
@@ -28,56 +28,57 @@
}, },
"dependencies": { "dependencies": {
"@astrojs/check": "^0.9.6", "@astrojs/check": "^0.9.6",
"@astrojs/mdx": "^4.3.13",
"@astrojs/node": "^9.5.2", "@astrojs/node": "^9.5.2",
"@astrojs/partytown": "^2.1.4", "@astrojs/partytown": "^2.1.4",
"@astrojs/react": "^4.4.2", "@astrojs/react": "^4.4.2",
"@astrojs/rss": "^4.0.15", "@astrojs/rss": "^4.0.15",
"@astrojs/sitemap": "^3.7.0", "@astrojs/sitemap": "^3.7.0",
"@directus/sdk": "^21.1.0", "@directus/sdk": "^21.0.0",
"@giscus/react": "^3.1.0", "@giscus/react": "^3.1.0",
"@iconify-json/mdi": "^1.2.3", "@iconify-json/mdi": "^1.2.3",
"@iconify-json/pajamas": "^1.2.15", "@iconify-json/pajamas": "^1.2.15",
"@iconify-json/simple-icons": "^1.2.70", "@iconify-json/simple-icons": "^1.2.67",
"@playform/compress": "^0.2.1", "@playform/compress": "^0.2.1",
"@swup/astro": "^1.7.0", "@rehype-pretty/transformers": "^0.13.2",
"@swup/astro": "1.7.0",
"@tailwindcss/postcss": "^4.1.18", "@tailwindcss/postcss": "^4.1.18",
"@tailwindcss/vite": "^4.1.18", "@tailwindcss/vite": "^4.1.18",
"@types/react": "^19.2.13", "@types/react": "^19.2.9",
"@types/unist": "^3.0.3", "@types/unist": "^3.0.3",
"astro": "^5.17.1", "astro": "^5.16.15",
"astro-compressor": "^1.2.0", "astro-compressor": "^1.2.0",
"astro-icon": "^1.1.5", "astro-icon": "^1.1.5",
"marked": "^17.0.1",
"marked-shiki": "^1.2.1",
"mdast-util-to-string": "^4.0.0", "mdast-util-to-string": "^4.0.0",
"motion": "^12.34.0", "motion": "^12.29.0",
"preline": "^4.0.1", "preline": "^3.2.3",
"react": "^19.2.4", "react": "^19.2.3",
"react-dom": "^19.2.4", "react-dom": "^19.2.3",
"reading-time": "^1.5.0", "reading-time": "^1.5.0",
"rehype-pretty-code": "^0.14.1",
"sharp": "^0.34.5", "sharp": "^0.34.5",
"sharp-ico": "^0.1.5", "sharp-ico": "^0.1.5",
"shiki": "^3.22.0", "shiki": "^3.21.0",
"tailwindcss": "^4.1.18", "tailwindcss": "^4.1.18",
"ultrahtml": "^1.6.0" "ultrahtml": "^1.6.0"
}, },
"devDependencies": { "devDependencies": {
"@eslint-react/eslint-plugin": "^2.12.2", "@eslint-react/eslint-plugin": "^2.7.2",
"@tailwindcss/forms": "^0.5.11", "@tailwindcss/forms": "^0.5.11",
"@tailwindcss/typography": "^0.5.19", "@tailwindcss/typography": "^0.5.19",
"astro-icon": "^1.1.5", "astro-icon": "^1.1.5",
"eslint": "^10.0.0", "eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8", "eslint-config-prettier": "^10.1.8",
"eslint-plugin-astro": "^1.5.0", "eslint-plugin-astro": "^1.5.0",
"eslint-plugin-format": "^1.4.0", "eslint-plugin-format": "^1.3.1",
"eslint-plugin-react": "^7.37.5", "eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.5.0", "eslint-plugin-react-refresh": "^0.4.26",
"prettier": "^3.8.1", "prettier": "^3.8.1",
"prettier-plugin-astro": "^0.14.1", "prettier-plugin-astro": "^0.14.1",
"prettier-plugin-tailwindcss": "^0.7.2", "prettier-plugin-tailwindcss": "^0.7.2",
"timeago.js": "^4.0.2", "timeago.js": "^4.0.2",
"typescript": "^5.9.3", "typescript": "5.9.3",
"typescript-eslint": "^8.55.0" "typescript-eslint": "8.53.1"
} }
} }

3112
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -12,10 +12,10 @@ const { posts } = Astro.props;
<section class="mx-auto mb-10 max-w-[85rem] px-4 py-8 sm:px-6 lg:px-8 2xl:max-w-full"> <section class="mx-auto mb-10 max-w-[85rem] px-4 py-8 sm:px-6 lg:px-8 2xl:max-w-full">
<div class="text-left"> <div class="text-left">
<h2 <h2
id="recent-articles" id="selected-articel"
class="smooth-reveal-2 mb-10 text-5xl font-extrabold tracking-tight text-balance text-neutral-800 dark:text-neutral-200" class="smooth-reveal-2 mb-4 text-5xl font-extrabold tracking-tight text-balance text-neutral-800 dark:text-neutral-200"
> >
Recent Posts Older Articles
</h2> </h2>
</div> </div>

View File

@@ -10,11 +10,12 @@ interface Props {
} }
const { posts } = Astro.props; const { posts } = Astro.props;
const blogPosts = posts.slice(0, 5);
--- ---
<section class="smooth-reveal"> <section class="smooth-reveal">
{ {
posts.map((b, index) => blogPosts.map((b, index) =>
index % 2 === 0 ? ( index % 2 === 0 ? (
<BlogLeftSection <BlogLeftSection
title={b.title} title={b.title}

View File

@@ -15,12 +15,11 @@ const borderClasses = 'border border-neutral-100 dark:border-stone-500/20';
const bgColorClasses = const bgColorClasses =
'bg-neutral-100/80 hover:bg-neutral-100 dark:bg-neutral-800/60 dark:hover:bg-neutral-800/90'; 'bg-neutral-100/80 hover:bg-neutral-100 dark:bg-neutral-800/60 dark:hover:bg-neutral-800/90';
const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shadow-lg'; const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shadow-lg';
const sizeClasses = 'h-30 w-100 md:w-[300px]';
--- ---
<div class={`${baseClasses}`}> <div class={`${baseClasses}`}>
<a <a
class={`rounded-xl duration-300 transition-all ${sizeClasses} ${borderClasses} ${bgColorClasses} ${shadowClasses}`} class={`rounded-xl duration-300 transition-all h-30 ${borderClasses} ${bgColorClasses} ${shadowClasses}`}
href={url} href={url}
data-astro-prefetch data-astro-prefetch
> >

View File

@@ -1,8 +0,0 @@
---
import Image from '@components/ui/images/Image.astro';
const { src, alt } = Astro.props;
---
<Image src={src} alt={alt} style="color: transparent; width: 32px; height: 32px; object-fit: contain; max-height: 100%; max-width: 100%;" draggable="false" loading="lazy" width="32" height="32" />

View File

@@ -1,58 +0,0 @@
---
import { readItems } from '@directus/sdk';
import ApplicationLogo from '@components/ui/logos/ApplicationLogo.astro';
import type { Application } from '@lib/directusTypes';
import directus from '@lib/directus';
const applications = await directus.request(
readItems('site_applications', {
fields: ['*'],
sort: ['-isActive'],
})
);
const baseClasses = 'smooth-reveal-cards rounded-xl flex flex-col';
const borderClasses = 'border border-neutral-100 dark:border-stone-500/20';
const bgColorClasses =
'bg-neutral-100/80 hover:bg-neutral-100 dark:bg-neutral-800/60 dark:hover:bg-neutral-800/90';
const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shadow-lg';
---
<section class:list={['flex flex-col gap-4', Astro.props.className]}>
<div class="grid grid-cols-1 gap-3 md:grid-cols-2 print:flex print:flex-col">
{
applications.map((application: Application) => {
return (
<div class={`${baseClasses}`}>
<a
class={`rounded-xl transition-all duration-300 ${borderClasses} ${bgColorClasses} ${shadowClasses}`}
href={application.url}
>
<div class="p-4 md:p-10">
<div class="flex">
<ApplicationLogo
src={application.logoUrl}
alt={`Logo of ${application.name}`}
/>
<h3 class="text-lg font-bold text-gray-800 dark:text-white ml-4">
{application.name}
</h3>
</div>
<p class="mt-2 text-gray-500 dark:text-neutral-400">{application.description}</p>
<ul class="mt-1 flex list-disc flex-col gap-2 text-sm text-gray-500 dark:text-neutral-400 [&>li]:ml-4">
{application.highlights.map((highlight) => {
return <li class="marker:text-yellow-500">{highlight}</li>;
})}
</ul>
<div class="flex">
</div>
</div>
</a>
</div>
);
})
}
</div>
</section>

View File

@@ -20,7 +20,7 @@ const certificate = await directus.request(
}) })
); );
const baseClasses = 'rounded-xl flex flex-col'; const baseClasses = ' rounded-xl flex flex-col';
const borderClasses = 'border border-neutral-100 dark:border-stone-500/20'; const borderClasses = 'border border-neutral-100 dark:border-stone-500/20';
const bgColorClasses = const bgColorClasses =
'bg-neutral-100/80 hover:bg-neutral-100 dark:bg-neutral-800/60 dark:hover:bg-neutral-800/90'; 'bg-neutral-100/80 hover:bg-neutral-100 dark:bg-neutral-800/60 dark:hover:bg-neutral-800/90';
@@ -35,16 +35,16 @@ const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shado
</h3> </h3>
<div class="ml-8"> <div class="ml-8">
<h4 class="smooth-reveal-1 pt-5 text-2xl font-semibold text-neutral-800 dark:text-neutral-200"> <h4 class="smooth-reveal-1 pt-5 text-2xl font-semibold text-neutral-800 dark:text-neutral-200">
College University
</h4> </h4>
<ul class="space-y-4 py-3"> <ul class="space-y-4 py-3">
<div class="grid md:grid-cols-2 sm:grid-cols-1 gap-4">
{ {
education.map(({ institution, area, url, graduationDate}) => { education.map(({ institution, area, url }) => {
return ( return (
<div class="smooth-reveal-cards mt-4 rounded-xl"> <div class="smooth-reveal-cards mt-4 grid grid-cols-3 gap-4 rounded-xl">
<div>
<div <div
class={`p-4 md:p-6 transition-all duration-300 ${shadowClasses} ${bgColorClasses} ${baseClasses} ${borderClasses}`} class={`p-4 transition-all duration-300 md:p-5 ${shadowClasses} ${bgColorClasses} ${baseClasses} ${borderClasses}`}
> >
<h3 class="flex flex-row text-lg font-bold text-neutral-800 dark:text-neutral-200"> <h3 class="flex flex-row text-lg font-bold text-neutral-800 dark:text-neutral-200">
<Icon <Icon
@@ -54,7 +54,7 @@ const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shado
{institution} {institution}
</h3> </h3>
<p class="mt-2 ml-7 text-xs font-medium text-neutral-600 uppercase dark:text-neutral-400"> <p class="mt-2 ml-7 text-xs font-medium text-neutral-600 uppercase dark:text-neutral-400">
{area} - {new Date(graduationDate).getFullYear()} {area}
</p> </p>
<div class="ml-6 flex"> <div class="ml-6 flex">
<a <a
@@ -72,10 +72,10 @@ const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shado
</div> </div>
</div> </div>
</div> </div>
</div>
); );
}) })
} }
</div>
</ul> </ul>
</div> </div>
@@ -86,12 +86,12 @@ const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shado
Certificates Certificates
</h4> </h4>
<ul class="space-y-4 py-3"> <ul class="space-y-4 py-3">
<div class="grid md:grid-cols-2 sm:grid-cols-1 gap-4">
{certificate.map(({ name, issuer, url }) => { {certificate.map(({ name, issuer, url }) => {
return ( return (
<div class="smooth-reveal-cards mt-4 rounded-xl"> <div class="smooth-reveal-cards mt-4 grid grid-cols-3 gap-4 rounded-xl">
<div>
<div <div
class={`p-4 md:p-6 transition-all duration-300 ${shadowClasses} ${bgColorClasses} ${baseClasses} ${borderClasses}`} class={`p-4 transition-all duration-300 md:p-5 ${shadowClasses} ${bgColorClasses} ${baseClasses} ${borderClasses}`}
> >
<h3 class="flex flex-row text-lg font-bold text-neutral-800 dark:text-neutral-200"> <h3 class="flex flex-row text-lg font-bold text-neutral-800 dark:text-neutral-200">
<Icon <Icon
@@ -119,9 +119,9 @@ const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shado
</div> </div>
</div> </div>
</div> </div>
</div>
); );
})} })}
</div>
</ul> </ul>
</div> </div>
) )

View File

@@ -15,7 +15,7 @@ const experiences = await directus.request(
--- ---
<section <section
class:list={['flex flex-col gap-8', Astro.props.className]} class:list={['flex flex-col gap-4', Astro.props.className]}
> >
<h3 class="relative smooth-reveal-1 flex w-full items-center gap-3 pb-10 text-5xl text-neutral-800 dark:text-neutral-200">Experience</h3> <h3 class="relative smooth-reveal-1 flex w-full items-center gap-3 pb-10 text-5xl text-neutral-800 dark:text-neutral-200">Experience</h3>

View File

@@ -7,12 +7,12 @@ import FeaturesCard from '@components/ui/cards/FeaturesCard.astro';
const global = await directus.request(readSingleton('site_global')); const global = await directus.request(readSingleton('site_global'));
--- ---
<section class="mx-auto mb-20 max-w-340 px-4 py-10 sm:px-6 lg:px-8 lg:py-14 2xl:max-w-full"> <section class="mx-auto mb-20 max-w-[85rem] px-4 py-10 sm:px-6 lg:px-8 lg:py-14 2xl:max-w-full">
<div <div
class="flex flex-col items-center justify-center gap-y-2 sm:flex-row sm:gap-x-12 sm:gap-y-0 lg:gap-x-24" class="flex flex-col items-center justify-center gap-y-2 sm:flex-row sm:gap-x-12 sm:gap-y-0 lg:gap-x-24"
> >
<div class="max-w-5xl sm:px-6 lg:px-8"> <div class="mx-auto max-w-5xl px-4 sm:px-6 lg:px-8">
<div class="flex flex-wrap gap-6 sm:grid-cols-2 sm:gap-6 lg:grid-cols-3 justify-center"> <div class="grid gap-3 sm:grid-cols-2 sm:gap-6 lg:grid-cols-3">
<FeaturesCard <FeaturesCard
title="Cloud Engineer" title="Cloud Engineer"
description="Full stack and cloud engineer." description="Full stack and cloud engineer."
@@ -25,12 +25,6 @@ const global = await directus.request(readSingleton('site_global'));
url="/categories/homelab/" url="/categories/homelab/"
icon="mdi:home-variant-outline" icon="mdi:home-variant-outline"
/> />
<FeaturesCard
title="Documentation"
description="Reference and guides for my homelab."
url="https://docs.alexlebens.dev"
icon="mdi:file-document-multiple"
/>
<FeaturesCard <FeaturesCard
title="Email" title="Email"
description={`Send me a message.`} description={`Send me a message.`}

View File

@@ -15,14 +15,11 @@ interface Props {
secondaryBtnURL?: string; secondaryBtnURL?: string;
src?: any; src?: any;
alt?: string; alt?: string;
rounded?: boolean;
} }
const roundedClasses = Astro.props.rounded ? "rounded-xl" : null;
--- ---
<section <section
class="mx-auto grid max-w-340 gap-4 px-4 py-14 sm:px-6 md:grid-cols-2 md:items-center md:gap-8 lg:px-8 2xl:max-w-full" class="mx-auto grid max-w-[85rem] gap-4 px-4 py-14 sm:px-6 md:grid-cols-2 md:items-center md:gap-8 lg:px-8 2xl:max-w-full"
> >
<div> <div>
<h1 <h1
@@ -51,7 +48,7 @@ const roundedClasses = Astro.props.rounded ? "rounded-xl" : null;
<Image <Image
src={src} src={src}
alt={alt} alt={alt}
class={`h-full w-[420px] scale-100 object-cover object-center ${roundedClasses}`} class="h-full w-[420px] scale-100 object-cover object-center"
draggable="false" draggable="false"
loading="eager" loading="eager"
format="webp" format="webp"

View File

@@ -25,6 +25,9 @@ const recentPosts = posts
> >
Latest Posts Latest Posts
</h1> </h1>
<p class="smooth-reveal mt-1 text-pretty text-neutral-600 dark:text-neutral-300">
More recent posts.
</p>
</div> </div>
<div class="grid gap-6 sm:grid-cols-2 lg:grid-cols-3"> <div class="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
{recentPosts.map((b) => <BlogCard post={b} />)} {recentPosts.map((b) => <BlogCard post={b} />)}

View File

@@ -2,25 +2,47 @@ import { readSingleton } from '@directus/sdk';
import directus from '@lib/directus'; import directus from '@lib/directus';
const global = await directus.request(readSingleton('site_global'));
export interface NavigationLink { export interface NavigationLink {
name: string; name: string;
url: string; url: string;
} }
const global = await directus.request(readSingleton('site_global'));
export const WorkInformation = [
{
name: 'Tech Startup',
position: 'Junior Web Developer',
location_type: 'On site',
location: 'Auckland, New Zealand',
url: 'https://techstartup.com',
startDate: '2024-01-01',
endDate: null,
summary:
'Developing and maintaining web applications using JavaScript, HTML, and CSS. Collaborating with the team to implement new features and fix bugs.',
highlights: ['Improved website performance by optimizing code'],
responsibilities: [
'Collaborated with senior developers to design and implement web applications using modern JavaScript frameworks.',
'Assisted in debugging and optimizing front-end code to ensure smooth user experiences.',
'Participated in code reviews and contributed to improving coding standards within the team.',
],
achievements: [
'Developing and maintaining web applications using JavaScript, HTML, and CSS. Collaborating with the team to implement new features and fix bugs.',
],
skills: ['React', 'Tailwind', 'GitHub'],
},
];
export const NavigationLinks: NavigationLink[] = [ export const NavigationLinks: NavigationLink[] = [
{ name: 'Home', url: '/' }, { name: 'Home', url: '/' },
{ name: 'Blog', url: '/blog/' }, { name: 'Blog', url: '/blog/' },
{ name: 'Categories', url: '/categories/' }, { name: 'Categories', url: '/categories/' },
{ name: 'Apps', url: '/apps/' },
{ name: 'About Me', url: '/about/' }, { name: 'About Me', url: '/about/' },
]; ];
export const FooterLinks: NavigationLink[] = [ export const FooterLinks: NavigationLink[] = [
{ name: 'RSS', url: '/rss.xml' }, { name: 'RSS', url: '/rss.xml' },
{ name: 'Gitea', url: 'https://gitea.alexlebens.dev' }, { name: 'Gitea', url: '/https://gitea.alexlebens.dev' },
{ name: 'Docs', url: 'https://docs.alexlebens.dev' },
]; ];
export const SEO = { export const SEO = {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 MiB

View File

@@ -3,7 +3,6 @@ import { createDirectus, rest } from '@directus/sdk';
import type { import type {
Global, Global,
Post, Post,
Application,
Experience, Experience,
Education, Education,
Certificate, Certificate,
@@ -16,7 +15,6 @@ import { getDirectusURL } from '@lib/directusFunctions';
type Schema = { type Schema = {
site_global: Global; site_global: Global;
posts: Post[]; posts: Post[];
site_applications: Application;
site_experience: Experience; site_experience: Experience;
site_education: Education; site_education: Education;
site_certificate: Certificate; site_certificate: Certificate;

View File

@@ -2,7 +2,7 @@ const getDirectusURL = () => {
if (process.env.DIRECTUS_URL) { if (process.env.DIRECTUS_URL) {
return `https://${process.env.DIRECTUS_URL}`; return `https://${process.env.DIRECTUS_URL}`;
} }
return 'https://directus.alexlebens.net'; return 'https://directus.alexlebens.dev';
}; };
async function getDirectusImageURL(image: string) { async function getDirectusImageURL(image: string) {

View File

@@ -2,9 +2,6 @@ export type Global = {
name: string; name: string;
about: string; about: string;
about_description: string; about_description: string;
about_blog: string;
about_applications: string;
about_categories: string;
initials: string; initials: string;
email: string; email: string;
site_url: string; site_url: string;
@@ -13,12 +10,10 @@ export type Global = {
portrait_alt: string; portrait_alt: string;
home_image: string; home_image: string;
home_image_alt: string; home_image_alt: string;
blog_image: string;
blog_image_alt: string;
categories_image: string; categories_image: string;
categories_image_alt: string; categories_image_alt: string;
applications_image: string; blog_image: string;
applications_image_alt: string; blog_image_alt: string;
footer_image: string; footer_image: string;
footer_image_alt: string; footer_image_alt: string;
}; };
@@ -40,16 +35,6 @@ export type Post = {
updated_date: Date; updated_date: Date;
}; };
export type Application = {
id: string;
name: string;
isActive: boolean;
description: string;
highlights: string[];
url: string;
logoUrl: string;
};
export type Experience = { export type Experience = {
id: string; id: string;
name: string; name: string;

View File

@@ -11,11 +11,13 @@ import Education from '@components/ui/sections/Education.astro';
import portraitImg from '@images/portrait.avif'; import portraitImg from '@images/portrait.avif';
const global = await directus.request(readSingleton('site_global')); const global = await directus.request(readSingleton('site_global'));
const description = 'About me.';
--- ---
<BaseLayout <BaseLayout
title="About Me" title="About Me"
description="About me." description={description}
structuredData={{ structuredData={{
'@context': 'https://schema.org', '@context': 'https://schema.org',
'@type': 'WebPage', '@type': 'WebPage',
@@ -23,7 +25,7 @@ const global = await directus.request(readSingleton('site_global'));
'@id': Astro.url.href, '@id': Astro.url.href,
url: Astro.url.href, url: Astro.url.href,
name: `About | ${global.name}`, name: `About | ${global.name}`,
description: 'About me.', description: description,
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
url: global.site_url, url: global.site_url,
@@ -37,12 +39,11 @@ const global = await directus.request(readSingleton('site_global'));
subTitle={global.about} subTitle={global.about}
src={portraitImg} src={portraitImg}
alt={global.portrait_alt} alt={global.portrait_alt}
rounded={true}
/> />
<section class="mx-auto max-w-340 px-4 py-10 sm:px-6 lg:px-8 lg:py-14"> <section class="mx-auto max-w-[85rem] px-4 py-10 sm:px-6 lg:px-8 lg:py-14">
<main class="relative grid grid-cols-1 md:grid-cols-6 gap-12 p-8 md:p-16 xl:gap-24 max-w-7xl mx-auto"> <main class="relative grid max-w-7xl gap-12 p-8 max-sm:py-16 md:grid-cols-6 md:p-16 xl:gap-24">
<div class="space-y-12 col-span-1 md:col-span-6"> <div class="space-y-12 md:col-span-8">
<Experience className="smooth-reveal-2" /> <Experience className="smooth-reveal-2" />
<Education className="smooth-reveal-2 mt-30" /> <Education className="smooth-reveal-2 mt-30" />
<Projects className="smooth-reveal-2 mt-30" /> <Projects className="smooth-reveal-2 mt-30" />

View File

@@ -1,66 +0,0 @@
---
import { readSingleton } from '@directus/sdk';
import directus from '@lib/directus';
import BaseLayout from '@layouts/BaseLayout.astro';
import HeroSection from '@components/ui/sections/HeroSection.astro';
import Applications from '@components/ui/sections/Applications.astro';
import applicationImg from '@images/cedar_tree.png';
const global = await directus.request(readSingleton('site_global'));
---
<BaseLayout
title="Applications"
description={global.about_applications}
structuredData={{
'@context': 'https://schema.org',
'@type': 'WebPage',
inLanguage: 'en-US',
'@id': Astro.url.href,
url: Astro.url.href,
name: `Applications | ${global.name}`,
description: global.about_applications,
isPartOf: {
'@type': 'WebSite',
url: global.site_url,
name: global.name,
description: global.about,
},
}}
>
<HeroSection
title="Applications"
subTitle={global.about_applications}
src={applicationImg}
alt={global.applications_image_alt}
/>
<section class="mx-auto max-w-340 px-4 sm:px-6 lg:px-8 lg:py-14 pb-10">
<main class="relative grid grid-cols-1 md:grid-cols-6 gap-12 p-2 md:p-16 xl:gap-24 max-w-7xl mx-auto">
<div class="space-y-12 col-span-1 md:col-span-6">
<Applications className="smooth-reveal-2" />
</div>
</main>
</section>
</BaseLayout>
<script>
// Add smooth reveal animations for content after loading
document.addEventListener('astro:page-load', () => {
const animateContent = () => {
// Animate group 1
const smoothReveal = document.querySelectorAll('.smooth-reveal');
smoothReveal.forEach((el, index) => {
setTimeout(
() => {
el.classList.add('animate-reveal');
},
50 + index * 100
);
});
};
animateContent();
});
</script>

View File

@@ -4,9 +4,6 @@ import getReadingTime from 'reading-time';
import { readItems, readSingleton } from '@directus/sdk'; import { readItems, readSingleton } from '@directus/sdk';
import directus from '@lib/directus'; import directus from '@lib/directus';
import { marked } from 'marked';
import markedShiki from 'marked-shiki';
import { createHighlighter } from 'shiki';
import { getDirectusImageURL } from '@lib/directusFunctions'; import { getDirectusImageURL } from '@lib/directusFunctions';
import BaseLayout from '@layouts/BaseLayout.astro'; import BaseLayout from '@layouts/BaseLayout.astro';
import Image from '@components/ui/images/Image.astro'; import Image from '@components/ui/images/Image.astro';
@@ -26,24 +23,6 @@ const category: CollectionEntry<'categories'> = (await getCollection('categories
.filter((c) => c.slug === post.category) .filter((c) => c.slug === post.category)
.pop() as CollectionEntry<'categories'>; .pop() as CollectionEntry<'categories'>;
const readingTime = getReadingTime(post.content); const readingTime = getReadingTime(post.content);
const highlighter = await createHighlighter({
themes: ['github-light', 'github-dark', 'monokai'],
langs: ['typescript', 'python', 'css', 'html', 'yaml', 'bash', 'json'],
});
marked.use(markedShiki({
highlight(code, lang) {
return highlighter.codeToHtml(code, {
lang: lang || 'plaintext',
themes: {
light: 'github-light',
dark: 'github-dark',
},
defaultColor: false,
});
}
}));
const content = marked.parse(post.content);
--- ---
<BaseLayout <BaseLayout
@@ -145,9 +124,9 @@ const content = marked.parse(post.content);
</div> </div>
<article <article
class="prose prose-blog sm:prose-lg dark:prose-invert max-w-none text-neutral-800 dark:text-neutral-200" class="prose prose-blog sm:prose-lg dark:prose-invert max-w-none text-justify text-neutral-800 dark:text-neutral-200"
> >
<div set:html={content} /> <div set:html={post.content} />
</article> </article>
<div <div

View File

@@ -5,8 +5,8 @@ import type { Post } from '@lib/directusTypes';
import directus from '@lib/directus'; import directus from '@lib/directus';
import BaseLayout from '@layouts/BaseLayout.astro'; import BaseLayout from '@layouts/BaseLayout.astro';
import BlogSelectedArticles from '@components/blog/BlogSelectedArticles.astro'; import BlogRecentCard from '@components/blog/BlogRecentCard.astro';
import BlogRecentArticles from '@components/blog/BlogRecentArticles.astro'; import BlogFeaturedArticle from '@components/blog/BlogFeaturedArticle.astro';
import HeroSection from '@components/ui/sections/HeroSection.astro'; import HeroSection from '@components/ui/sections/HeroSection.astro';
import blogImg from '@images/autumn_tree.png'; import blogImg from '@images/autumn_tree.png';
@@ -18,15 +18,15 @@ const posts = await directus.request(
sort: ['-published_date'], sort: ['-published_date'],
}) })
); );
const selectedPosts: Post[] = posts.filter((p) => p.selected).slice(0, 4); const selectedPosts: Post[] = posts.filter((p) => p.selected);
const recentPosts: Post[] = posts.filter(
(p) => !selectedPosts.some((selected) => selected.slug === p.slug) const description =
).slice(0, 6); "Sharing what I've learned, one post at a time. I hope you find something useful.";
--- ---
<BaseLayout <BaseLayout
title="Blog" title="Blog"
description={global.about_blog} description={description}
structuredData={{ structuredData={{
'@context': 'https://schema.org', '@context': 'https://schema.org',
'@type': 'WebPage', '@type': 'WebPage',
@@ -34,7 +34,7 @@ const recentPosts: Post[] = posts.filter(
'@id': Astro.url.href, '@id': Astro.url.href,
url: Astro.url.href, url: Astro.url.href,
name: `Blog | ${global.name}`, name: `Blog | ${global.name}`,
description: global.about_blog, description: description,
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
url: global.site_url, url: global.site_url,
@@ -43,10 +43,10 @@ const recentPosts: Post[] = posts.filter(
}, },
}} }}
> >
<HeroSection title="Blog" subTitle={global.about_blog} src={blogImg} alt={global.blog_image_alt} /> <HeroSection title="Blog" subTitle={description} src={blogImg} alt={global.blog_image_alt} />
<BlogSelectedArticles posts={selectedPosts} /> <BlogRecentCard posts={posts} />
<BlogRecentArticles posts={recentPosts} /> <BlogFeaturedArticle posts={selectedPosts} />
</BaseLayout> </BaseLayout>
<script> <script>

View File

@@ -73,11 +73,14 @@ const categories = (await getCollection('categories'))
}, },
}; };
}); });
const description =
'Here are some of the general categories that I am interested in, including homelabs, technology, and Minnesota.';
--- ---
<BaseLayout <BaseLayout
title="All Categories" title="All Categories"
description={global.about_categories} description={description}
structuredData={{ structuredData={{
'@context': 'https://schema.org', '@context': 'https://schema.org',
'@type': 'WebPage', '@type': 'WebPage',
@@ -85,7 +88,7 @@ const categories = (await getCollection('categories'))
'@id': Astro.url.href, '@id': Astro.url.href,
url: Astro.url.href, url: Astro.url.href,
name: `All Categories | ${global.name}`, name: `All Categories | ${global.name}`,
description: global.about_categories, description: description,
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
url: global.site_url, url: global.site_url,
@@ -96,7 +99,7 @@ const categories = (await getCollection('categories'))
> >
<HeroSection <HeroSection
title="Categories" title="Categories"
subTitle={global.about_categories} subTitle={description}
src={categoryImg} src={categoryImg}
alt={global.categories_image_alt} alt={global.categories_image_alt}
/> />

View File

@@ -10,11 +10,14 @@ import HeroSectionAlt from '@components/ui/sections/HeroSectionAlt.astro';
import homeImg from '@images/autumn_mountain.png'; import homeImg from '@images/autumn_mountain.png';
const global = await directus.request(readSingleton('site_global')); const global = await directus.request(readSingleton('site_global'));
const description =
'Engineering the cloud by day, homelab by night, and exploring Minnesota in between.';
--- ---
<BaseLayout <BaseLayout
title="Home" title="Home"
description={global.about_description} description={description}
structuredData={{ structuredData={{
'@context': 'https://schema.org', '@context': 'https://schema.org',
'@type': 'WebPage', '@type': 'WebPage',
@@ -22,7 +25,7 @@ const global = await directus.request(readSingleton('site_global'));
'@id': Astro.url.href, '@id': Astro.url.href,
url: Astro.url.href, url: Astro.url.href,
name: `Home | ${global.name}`, name: `Home | ${global.name}`,
description: global.about_description, description: description,
isPartOf: { isPartOf: {
'@type': 'WebSite', '@type': 'WebSite',
url: global.site_url, url: global.site_url,
@@ -33,7 +36,7 @@ const global = await directus.request(readSingleton('site_global'));
> >
<HeroSection <HeroSection
title={`Hello, I'm <span class="text-steel dark:text-steel">Alex Lebens</span>`} title={`Hello, I'm <span class="text-steel dark:text-steel">Alex Lebens</span>`}
subTitle={global.about_description} subTitle={description}
primaryBtn="About Me" primaryBtn="About Me"
primaryBtnURL="/about" primaryBtnURL="/about"
src={homeImg} src={homeImg}

View File

@@ -1,5 +1,8 @@
// From https://github.com/delucis/astro-blog-full-text-rss // copy from https://github.com/delucis/astro-blog-full-text-rss
// see https://github.com/delucis/astro-blog-full-text-rss/blob/latest/src/pages/rss.xml.ts
// get more context
import { getContainerRenderer as getMDXRenderer } from '@astrojs/mdx';
import rss, { type RSSFeedItem } from '@astrojs/rss'; import rss, { type RSSFeedItem } from '@astrojs/rss';
import type { APIContext } from 'astro'; import type { APIContext } from 'astro';
import { transform, walk } from 'ultrahtml'; import { transform, walk } from 'ultrahtml';
@@ -11,11 +14,13 @@ import directus from '@lib/directus';
const global = await directus.request(readSingleton('site_global')); const global = await directus.request(readSingleton('site_global'));
export async function GET(context: APIContext) { export async function GET(context: APIContext) {
// Get the URL to prepend to relative site links. Based on `site` in `astro.config.mjs`.
let baseUrl = context.site?.href || global.site_url; let baseUrl = context.site?.href || global.site_url;
if (baseUrl.at(-1) === '/') { if (baseUrl.at(-1) === '/') {
baseUrl = baseUrl.slice(0, -1); baseUrl = baseUrl.slice(0, -1);
} }
// Load the content collection entries to add to our RSS feed.
const posts = await directus.request( const posts = await directus.request(
readItems('posts', { readItems('posts', {
filter: { published: { _eq: true } }, filter: { published: { _eq: true } },
@@ -43,6 +48,7 @@ export async function GET(context: APIContext) {
feedItems.push({ ...post, link: `/blog/${post.slug}/`, content }); feedItems.push({ ...post, link: `/blog/${post.slug}/`, content });
} }
// Return our RSS feed XML response.
return rss({ return rss({
title: global.name, title: global.name,
description: global.about, description: global.about,

View File

@@ -7,7 +7,7 @@
/* https://tailwindcss.com/docs/dark-mode */ /* https://tailwindcss.com/docs/dark-mode */
@custom-variant dark (&:where(.dark, .dark *)); @custom-variant dark (&:where(.dark, .dark *));
/* Custom colors */ /* Add custom colors */
@theme { @theme {
--color-midnight: #0c354d; --color-midnight: #0c354d;
--color-turquoise: #0da797; --color-turquoise: #0da797;
@@ -60,30 +60,6 @@
color var(--theme-transition), color var(--theme-transition),
border-color var(--theme-transition); border-color var(--theme-transition);
} }
/* Shiki syntax highlighting */
:root {
--shiki-fg: var(--shiki-light);
--shiki-bg: var(--color-neutral-200);
}
.dark {
--shiki-fg: var(--shiki-dark);
--shiki-bg: var(--color-neutral-800);
}
pre.shiki {
background-color: var(--shiki-bg) !important;
color: var(--shiki-fg) !important;
}
pre.shiki span {
color: var(--shiki-light);
}
.dark pre.shiki span {
color: var(--shiki-dark) !important;
}
} }
/* Content reveal animations */ /* Content reveal animations */