Skip to content

Commit e00128c

Browse files
committed
chore: updated about me section to be an mdx file
1 parent 3777200 commit e00128c

File tree

5 files changed

+47
-30
lines changed

5 files changed

+47
-30
lines changed

src/components/ParallaxTextOverlay.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
// src/components/ParallaxTextOverlay.astro
33
export interface Props {
4-
text: string;
4+
text: string | string[];
55
}
66
77
const { text } = Astro.props;

src/content.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@ const blog = defineCollection({
99
}),
1010
});
1111

12+
const me = defineCollection({
13+
loader: glob({ pattern: "**/*.{md,mdx}", base: "./src/content/me" }),
14+
schema: z.object({
15+
skills: z.array(z.string()),
16+
}),
17+
});
18+
1219
// Ensure MDX files are included in the content collection
1320
export const collections = {
1421
blog,
22+
me,
1523
};

src/content/me/about.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
skills:
3+
- Python
4+
- Node.js
5+
- Typescript
6+
- Serverless
7+
- PostgreSQL
8+
- BigQuery
9+
- Github Actions
10+
- Terraform
11+
- GCP
12+
- AWS
13+
---
14+
15+
I'm <b>Ringolds&nbsp;Leščinskis</b>,
16+
17+
a <b>data engineer</b> architecting <b>serverless data&nbsp;pipelines</b>.
18+
19+
I leverage full-stack experience to build <b>scalable backend systems</b> on solid
20+
fundamentals (LLM-ready) and develop integrations by <b>reverse engineering</b>
21+
undocumented&nbsp;APIs.
22+
23+
...and I make mean milk washed cocktails.

src/layouts/BlogLayout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import "@/styles/global.css";
1010
1111
export interface Props {
1212
title: string;
13-
backgroundText: string;
13+
backgroundText: string | string[];
1414
}
1515
const { title, backgroundText } = Astro.props as Props;
1616
---

src/pages/index.astro

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,19 @@
22
import BlogLayout from "@/layouts/BlogLayout.astro";
33
import Tags from "@/components/Tags.astro";
44
import Tag from "@/components/Tag.astro";
5-
import { getCollection } from "astro:content";
5+
import { getCollection, getEntry } from "astro:content";
66
import TagLinkSmall from "@/components/TagLinkSmall.astro";
7+
import { render } from "astro:content";
78
8-
// Personal bio and skills
9-
const bio = [
10-
"I'm <b class='font-semibold text-white'>Ringolds&nbsp;Leščinskis</b>,",
9+
// Fetch about me content
10+
const about = await getEntry("me", "about");
11+
const skills = about?.data?.skills ?? [];
1112
12-
"a <b class='font-semibold text-white'>data engineer</b> architecting <b class='font-semibold text-white'>serverless data&nbsp;pipelines</b>.",
13-
"I leverage full-stack experience to build <b class='font-semibold text-white'>scalable backend systems</b> on solid fundamentals (LLM-ready) and develop integrations by <b class='font-semibold text-white'>reverse engineering</b> undocumented&nbsp;APIs.",
14-
"...and I make mean milk washed cocktails.",
15-
];
13+
if (!about) {
14+
throw new Error("About me content not found");
15+
}
1616
17-
const skills = [
18-
"Python",
19-
"Node.js",
20-
"Typescript",
21-
"Serverless",
22-
"PostgreSQL",
23-
"BigQuery",
24-
"Github Actions",
25-
"Terraform",
26-
"GCP",
27-
"AWS",
28-
];
17+
const { Content: AboutMeContent } = await render(about);
2918
3019
// Fetch and sort blog posts by date (descending)
3120
const posts = (await getCollection("blog")).sort((a, b) => {
@@ -50,14 +39,11 @@ const posts = (await getCollection("blog")).sort((a, b) => {
5039
<BlogLayout title="Ringolds Leščinskis" backgroundText={skills}>
5140
<div slot="hero" class="pb-8 md:text-center text-white">
5241
<div class="max-w-screen-md mx-auto mt-10 sm:mt-0 md:px-20">
53-
{
54-
bio.map((line) => (
55-
<p
56-
class="text-xl text-gray-200 font-light md:text-2xl mb-4"
57-
set:html={line}
58-
/>
59-
))
60-
}
42+
<div
43+
class="prose prose-invert prose-p:text-xl prose-p:md:text-2xl prose-p:mb-4 prose-p:font-light prose-p:text-gray-200 [&_b]:font-semibold [&_b]:text-white"
44+
>
45+
<AboutMeContent />
46+
</div>
6147

6248
<Tags class="-ml-4 sm:ml-0 mt-8">
6349
{

0 commit comments

Comments
 (0)