Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions aria/app/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import { notFound } from "next/navigation";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { formatDate } from "@/lib/utils";
import Image from "next/image";
import type { Metadata } from 'next';

type PageProps = {
params: Promise<{ slug: string }>;
};

export async function generateMetadata(props: PageProps) {
export async function generateMetadata(props: PageProps): Promise<Metadata | null> {
const params = await props.params;

const {
Expand Down Expand Up @@ -69,7 +70,7 @@ export default async function BlogPage(props: PageProps) {
<div className="!w-full">
<div className="w-full mb-7">
<Image
src={res.frontmatter.cover}
src={`/contents/blogs/${slug}/cover.jpeg`}
alt="cover"
width={700}
height={400}
Expand Down
7 changes: 3 additions & 4 deletions aria/app/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import Image from "next/image";
import Link from "next/link";

export const metadata: Metadata = {
title: "AriaDocs - Blog",
title: "Mega - Blog",
};

export default async function BlogIndexPage() {
const blogs = (await getAllBlogs()).sort(
(a, b) => stringToDate(b.date).getTime() - stringToDate(a.date).getTime()
(a, b) => stringToDate(b.date).getTime() - stringToDate(a.date).getTime(),
);
return (
<div className="w-full mx-auto flex flex-col gap-1 sm:min-h-[91vh] min-h-[88vh] pt-2">
Expand All @@ -37,7 +37,6 @@ function BlogCard({
title,
description,
slug,
cover,
authors,
}: BlogMdxFrontmatter & { slug: string }) {
return (
Expand All @@ -48,7 +47,7 @@ function BlogCard({
<h3 className="text-md font-semibold -mt-1 pr-7">{title}</h3>
<div className="w-full">
<Image
src={cover}
src={`/contents/blogs/${slug}/cover.jpeg`}
alt={title}
width={400}
height={150}
Expand Down
170 changes: 0 additions & 170 deletions aria/contents/blogs/file-rec.mdx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
---
title: "Using React Server Components and Server Actions in Next.js"
description: "Explore how to leverage React Server Components and Server Actions in Next.js to build modern, efficient web applications. Learn how these features enhance performance and simplify server-side logic."
date: 05-09-2024
title: "Why Rewrite Git Host Service with Rust Language"
description: ""
date: 24-12-2024
authors:
- avatar: "https://ui.shadcn.com/avatars/02.png"
handle: reactdev
username: React Dev
handleUrl: "https://github.com/reactdev"
- avatar: "https://ui.shadcn.com/avatars/01.png"
handle: nextjsguru
username: Next.js Guru
handleUrl: "https://github.com/nextjsguru"
cover: "https://img.freepik.com/premium-vector/many-monsters-various-colors-doodle-come-bless-birthday-happy_577083-85.jpg?w=826"
- avatar: "https://avatars.githubusercontent.com/u/76467?v=4&size=64"
handle: genedna
username: Quanyi Ma
handleUrl: "https://github.com/genedna"
cover: "contents/blogs/why-rewrite-git-host-service-with-rust-language/cover.jpg"
---

## Introduction: Enhancing Next.js with React Server Components
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.