Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ProchaLu committed Jan 8, 2025
1 parent 5f8ca41 commit cdb7af9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions app/[contentType]/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export async function generateMetadata({ params }: Params): Promise<Metadata> {
(await params).slug,
(await params).contentType,
);

return {
title: `${title} | ${info.site.siteTitle}`,
description: description ?? info.site.siteDescription,
Expand Down Expand Up @@ -71,7 +70,7 @@ export default async function ContentPage({ params }: Params) {
const { slug, contentType } = await params;

if (!contentTypesMap.has(contentType)) {
return notFound();
notFound();
}

const content = await fetchContentData(slug, contentType);
Expand All @@ -86,7 +85,9 @@ export default async function ContentPage({ params }: Params) {
<h1 className="my-0 font-bold font-display mb-2 text-2xl/normal md:text-4xl max-w-xl">
{content.title}
</h1>
<time className="block text-accent-4 mb-8">{content.date}</time>
<time className="block text-accent-4 mb-8">
{content.date.toString()}
</time>
{!!content.previewImage && (
<Image
className="pb-8 block object-cover"
Expand Down
2 changes: 1 addition & 1 deletion utils/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ export const getAllContentIds = (contentType: IContentType) => {
// return the slug of all the content IDs
return filenames.map((filename) => {
const filePath = path.join(baseDir, filename);
const fileContent = fs.readFileSync(filePath, 'utf-8');

const fileContent = fs.readFileSync(filePath, 'utf-8');
const matterResult = matter(fileContent);

return {
Expand Down

0 comments on commit cdb7af9

Please sign in to comment.