+
+
-
- {index < sortedPosts.length - 1 &&
}
+
+ {index < sortedPosts.length - 1 && (
+
+ )}
))
}
diff --git a/src/pages/resume.astro b/src/pages/resume.astro
index 4f7c9fe..4fcd76d 100644
--- a/src/pages/resume.astro
+++ b/src/pages/resume.astro
@@ -1,9 +1,9 @@
---
import { Icon } from "astro-icon/components";
import Layout from "../layouts/Layout.astro";
-import ResumeSkills from "../components/ResumeSkills";
-import ResumeDownloadButton from "../components/ResumeDownloadButton";
-import ResumeSettingsModal from "../components/ResumeSettingsModal";
+import ResumeSkills from "../components/ResumeSkills.vue";
+import ResumeDownloadButton from "../components/ResumeDownloadButton.vue";
+import ResumeSettingsModal from "../components/ResumeSettingsModal.vue";
import { config } from "../config";
import "../styles/global.css";
import * as TOML from "@iarna/toml";
diff --git a/src/pages/rss.xml.js b/src/pages/rss.xml.js
index 1a29fe6..f6a4c4f 100644
--- a/src/pages/rss.xml.js
+++ b/src/pages/rss.xml.js
@@ -1,31 +1,30 @@
-import rss from '@astrojs/rss';
-import { getCollection } from 'astro:content';
+import { getCollection } from "astro:content";
function formatPubDate(date) {
const timezone = process.env.PUBLIC_RSS_TIMEZONE
? process.env.PUBLIC_RSS_TIMEZONE
: import.meta.env.PUBLIC_RSS_TIMEZONE;
-
+
if (!timezone) {
return date;
}
-
+
try {
const year = date.getUTCFullYear();
- const month = String(date.getUTCMonth() + 1).padStart(2, '0');
- const day = String(date.getUTCDate()).padStart(2, '0');
-
- const formatter = new Intl.DateTimeFormat('en-US', {
+ const month = String(date.getUTCMonth() + 1).padStart(2, "0");
+ const day = String(date.getUTCDate()).padStart(2, "0");
+
+ const formatter = new Intl.DateTimeFormat("en-US", {
timeZone: timezone,
- timeZoneName: 'longOffset',
+ timeZoneName: "longOffset",
});
const parts = formatter.formatToParts(date);
- const offsetPart = parts.find(p => p.type === 'timeZoneName');
- const offset = offsetPart ? offsetPart.value.replace('GMT', '') : '+00:00';
+ const offsetPart = parts.find((p) => p.type === "timeZoneName");
+ const offset = offsetPart ? offsetPart.value.replace("GMT", "") : "+00:00";
const dateStr = `${year}-${month}-${day}T00:00:00${offset}`;
-
+
return new Date(dateStr);
} catch (e) {
console.warn(`Invalid timezone "${timezone}":`, e.message);
@@ -34,18 +33,45 @@ function formatPubDate(date) {
}
export async function GET(context) {
- const posts = await getCollection('posts');
-
- return rss({
- title: 'Atridad Lahiji',
- description: 'Recent posts from Atridad Lahiji',
- site: context.site,
- items: posts.map((post) => ({
- title: post.data.title,
- pubDate: formatPubDate(post.data.pubDate),
- description: post.data.description || '',
- link: `/post/${post.slug}/`,
- })),
- customData: `
en-us`,
+ const posts = await getCollection("posts");
+
+ // Sort posts by date, newest first
+ posts.sort((a, b) => new Date(b.data.pubDate) - new Date(a.data.pubDate));
+
+ const siteUrl = context.site?.toString().replace(/\/$/, "") || "";
+
+ const items = posts
+ .map((post) => {
+ const title = post.data.title;
+ const description = post.data.description || "";
+ const link = `${siteUrl}/post/${post.id}/`;
+ const pubDate = formatPubDate(post.data.pubDate).toUTCString();
+
+ return `
-
+
+ ${link}
+ ${link}
+
+ ${pubDate}
+
`;
+ })
+ .join("\n");
+
+ const rssXml = `
+
+
+ Atridad Lahiji
+ Recent posts from Atridad Lahiji
+ ${siteUrl}/
+ en-us
+
+${items}
+
+`;
+
+ return new Response(rssXml, {
+ headers: {
+ "Content-Type": "application/xml",
+ },
});
-}
\ No newline at end of file
+}
diff --git a/src/pdf/ResumeDocument.tsx b/src/pdf/ResumeDocument.tsx
index cd921a8..6941204 100644
--- a/src/pdf/ResumeDocument.tsx
+++ b/src/pdf/ResumeDocument.tsx
@@ -261,7 +261,7 @@ export const ResumeDocument = ({ data, resumeConfig, icons }: ResumeDocumentProp
return sectionNames.map((name) => {
const config = resumeConfig.sections[name];
const content = renderSectionContent(name);
-
+
// Check if section has content (simple check)
const hasContent = data[name] && data[name].length > 0;
diff --git a/src/types.ts b/src/types.ts
index a375f33..5b48ce4 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -1,11 +1,11 @@
import type { ImageMetadata } from "astro";
-import type { ComponentType } from "preact";
+import type { Component } from "vue";
import type { GiteaRepoInfo } from "./utils/gitea";
// Icon Types
-export type LucideIcon = ComponentType<{ size?: number; class?: string }>;
+export type LucideIcon = Component;
export type AstroIconName = string; // For astro-icon string references like "mdi:email"
-export type CustomIconComponent = ComponentType
;
+export type CustomIconComponent = Component;
export type IconType = LucideIcon | AstroIconName | CustomIconComponent;
export interface Talk {