diff --git a/blog/test.json b/blog/test.json deleted file mode 100644 index 53b15cd..0000000 --- a/blog/test.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "My Post", - "description": "This is a short description", - "author": "John Doe", - "date": "2025-12-03", - "readingTime": 1, - "tags": ["typescript", "nextjs"], - "image": "/images/my-post.jpg", - "category": "guides" -} diff --git a/blog/test.md b/blog/test.md deleted file mode 100644 index 6769dd6..0000000 --- a/blog/test.md +++ /dev/null @@ -1 +0,0 @@ -Hello world! \ No newline at end of file diff --git a/blog/welcome.json b/blog/welcome.json new file mode 100644 index 0000000..b2aa4bf --- /dev/null +++ b/blog/welcome.json @@ -0,0 +1,10 @@ +{ + "title": "Welcome to ORUS!", + "description": "ORUS is a organization for people just like you", + "author": "Klesti Selimaj", + "date": "2025-12-03", + "readingTime": 1, + "tags": ["welcome", "first", "ORUS"], + "image": "/orus-logo.svg", + "category": "news" +} diff --git a/blog/welcome.md b/blog/welcome.md new file mode 100644 index 0000000..30f7058 --- /dev/null +++ b/blog/welcome.md @@ -0,0 +1,7 @@ +# Hello, World! 👋 + +Welcome! ORUS is a cybersecurity & dev organization, Simply for developers. + +- 💻 open source: We love the open source community and our projects are all open source. +- 📚 growing community: We are a growing community full of beginners and pros. join here +- 🌐 cybersecurity & development: we develop projects for developers and cybersecurity enthusiasts \ No newline at end of file diff --git a/src/app/blog/[slug]/page.tsx b/src/app/blog/[slug]/page.tsx index 0e3472c..2596e4c 100644 --- a/src/app/blog/[slug]/page.tsx +++ b/src/app/blog/[slug]/page.tsx @@ -8,9 +8,10 @@ import { useParams } from "next/navigation"; import { PostPreview } from "@/lib/posts"; export default function BlogPost() { - const [post, setPost] = useState<(PostPreview & { content: string }) | null>( - null - ); + const [post, setPost] = useState<{ + content: string; + meta: PostPreview; + } | null>(null); const [mounted, setMounted] = useState(false); const { slug } = useParams(); @@ -50,7 +51,7 @@ export default function BlogPost() { return ( - Hero Section + {/* Hero Section */} - {post.category} + {post.meta.category} @@ -69,7 +70,7 @@ export default function BlogPost() { className="text-5xl lg:text-6xl font-bold mb-6" > - {post.title} + {post.meta.title} @@ -77,16 +78,16 @@ export default function BlogPost() { variants={itemVariants} className="flex flex-wrap items-center gap-4 text-sm text-slate-400 mb-8" > - {post.author} + {post.meta.author} • - {new Date(post.date).toLocaleDateString()} - {post.readingTime && ( + {new Date(post.meta.date).toLocaleDateString()} + {post.meta.readingTime && ( <> • - {post.readingTime} min read + {post.meta.readingTime} min read )} - {post.tags?.map((tag, idx) => ( + {post.meta.tags?.map((tag, idx) => ( {/* Optional Featured Image */} - {post.image && ( + {post.meta.image && ( {post.title} )}