Skip to content

Commit

Permalink
Remove seo link related
Browse files Browse the repository at this point in the history
  • Loading branch information
noobnooc committed Oct 11, 2024
1 parent c1827b9 commit 72dfbc5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export const runtime = "edge";
export async function generateMetadata({
params,
}: {
params: { lang: string; slug: string[] };
params: { lang: string; slug: string };
}): Promise<Metadata> {
const dictionary = await getDictionary(params.lang);

const [postSlug] = params.slug;
const postSlug = params.slug;

const post = posts.find(
(post) => post.lang === params.lang && post.slug === postSlug,
Expand Down Expand Up @@ -126,9 +126,8 @@ export default async function PostPage({
</a>
</div>
</article>

<PostAdvertising advertisements={dictionary.postAdvertisements} />

<PostAdvertising advertisements={dictionary.postAdvertisements} />
</div>
<section className="hidden md:flex md:basis-1/4 sticky top-28 border rounded-3xl p-4 flex-col shrink-0">
<label className="opacity-50 mb-4">{dictionary.labels.toc}</label>
Expand Down
2 changes: 1 addition & 1 deletion app/[lang]/posts/categories/[categorySlug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default async function CategoryPostsPage({
key={post.slug}
className="rounded-3xl p-4 border bg-white/50 dark:bg-indigo-100/5 flex flex-col gap-2"
>
<Link className="underline" href={post.seoLink}>
<Link className="underline" href={post.permalink}>
<h1 className="text-xl font-serif">{post.title}</h1>
</Link>
<p className="opacity-70">{post.description}</p>
Expand Down
2 changes: 1 addition & 1 deletion app/[lang]/posts/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default async function PostsPage({
key={post.slug}
className="rounded-3xl p-4 sm:px-8 border bg-white/50 dark:bg-indigo-100/5 flex flex-col gap-2"
>
<Link className="underline" href={post.seoLink}>
<Link className="underline" href={post.permalink}>
<h1 className="text-xl font-serif">{post.title}</h1>
</Link>
<p className="opacity-70">{post.description}</p>
Expand Down
1 change: 0 additions & 1 deletion velite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ const posts = defineCollection({
.transform((data) => ({
...data,
permalink: `/${data.lang}/posts/${data.slug}`,
seoLink: `/${data.lang}/posts/${data.slug}/${data.title}`,
})),
});

Expand Down

0 comments on commit 72dfbc5

Please sign in to comment.