Skip to content
Merged

Dev #315

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
114 changes: 57 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "akari",
"version": "2.0.8",
"version": "2.0.9",
"homepage": "https://github.com/sn0w12/Akari#readme",
"engines": {
"node": ">=20"
Expand Down Expand Up @@ -39,7 +39,7 @@
"embla-carousel-react": "^8.6.0",
"js-cookie": "^3.0.5",
"lucide-react": "^0.575.0",
"next": "^16.2.1",
"next": "^16.2.2",
"next-themes": "^0.4.6",
"openapi-fetch": "^0.17.0",
"radix-ui": "^1.4.3",
Expand Down
2 changes: 1 addition & 1 deletion src/app/(default)/author/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function generateMetadata(
): Promise<Metadata> {
const { id, page } = await props.params;
const name = id.replaceAll("-", " ");
const description = `View all manga by ${name} on Akari for free.`;
const description = `Browse the full manga catalog by ${name} on Akari.`;

const { data } = await getAuthor(name, page ? parseInt(page) : 1);

Expand Down
2 changes: 1 addition & 1 deletion src/app/(default)/genre/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function generateStaticParams() {
export async function generateMetadata(props: PageProps): Promise<Metadata> {
const { id, page } = await props.params;
const name = id.replaceAll("-", " ");
const description = `View all ${name} manga`;
const description = `Browse manga in the ${name} genre and find your next read on Akari.`;

const { data } = await getGenre(name, page ? parseInt(page) : 1);

Expand Down
12 changes: 4 additions & 8 deletions src/app/(default)/latest/[page]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { createMetadata } from "@/lib/seo";
import { Metadata } from "next";
import Page from "../page";
import Page, { generateMetadata as parentGenerateMetadata } from "../page";

interface PageProps {
params: Promise<{ page: string }>;
Expand All @@ -10,12 +9,9 @@ export async function generateStaticParams() {
return [{ page: "2" }];
}

export const metadata: Metadata = createMetadata({
title: "Latest Releases",
description: "Read the latest manga releases for free on Akari.",
image: "/og/akari.webp",
canonicalPath: "/latest",
});
export async function generateMetadata(props: PageProps): Promise<Metadata> {
return parentGenerateMetadata(props);
}

export default async function LatestPage(props: PageProps) {
return <Page {...props} />;
Expand Down
4 changes: 4 additions & 0 deletions src/app/(default)/manga/[id]/[scanlator]/[subId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ export async function generateMetadata({
description: description,
image: createOgImage("manga", chapter.mangaId),
canonicalPath: `/manga/${mangaParams.id}/${mangaParams.scanlator}/${mangaParams.subId}`,
pagination: {
next: `/manga/${mangaParams.id}/${mangaParams.scanlator}/${chapter.nextChapter}`,
previous: `/manga/${mangaParams.id}/${mangaParams.scanlator}/${chapter.lastChapter}`,
},
});
}

Expand Down
9 changes: 1 addition & 8 deletions src/app/(default)/manga/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ export interface MangaPageProps {
params: Promise<{ id: string }>;
}

function truncate(text: string, maxLength: number): string {
if (text.length <= maxLength) return text;
return text.slice(0, maxLength - 1).trimEnd() + "…";
}

export async function generateStaticParams() {
if (STATIC_GENERATION_DISABLED) {
return [{ id: "737e7c9c-abac-4977-9c56-0a4ff26b295e" }];
Expand All @@ -41,11 +36,9 @@ export async function generateMetadata(
}

const manga = data.data;
const description = truncate(manga.description, 300);

return createMetadata({
title: manga.title,
description: description,
description: manga.description,
image: createOgImage("manga", manga.id),
canonicalPath: `/manga/${params.id}`,
});
Expand Down
2 changes: 1 addition & 1 deletion src/app/(default)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { getPopularData } from "./popular/page";

export const metadata: Metadata = createMetadata({
title: "Akari Manga",
description: "Read manga for free on Akari.",
description: "Browse popular manga and the latest releases on Akari.",
image: "/og/akari.webp",
canonicalPath: "/",
pagination: {
Expand Down
Loading
Loading