-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emoji Search about page, [slug] about page setup, UI tweaks
- Loading branch information
Showing
10 changed files
with
353 additions
and
25 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { readFileSync, readdirSync } from 'fs'; | ||
import { join } from 'path'; | ||
import matter from 'gray-matter'; | ||
import MarkdownRenderer from '@/components/MarkdownRenderer'; | ||
import { notFound } from 'next/navigation'; | ||
|
||
interface Props { | ||
params: { | ||
slug: string; | ||
}; | ||
} | ||
|
||
export default async function ProjectAboutPage({ params }: Props) { | ||
try { | ||
const { slug } = await params; | ||
const markdownFile = readFileSync( | ||
join(process.cwd(), `src/content/projects/${slug}/about.md`), | ||
'utf-8' | ||
); | ||
|
||
const { content } = matter(markdownFile); | ||
|
||
return <MarkdownRenderer content={content} />; | ||
} catch (error) { | ||
console.error('Error loading about page:', error); | ||
notFound(); | ||
} | ||
} | ||
|
||
export async function generateStaticParams() { | ||
const projectsDir = join(process.cwd(), 'src/content/projects'); | ||
const projectSlugs = readdirSync(projectsDir); | ||
|
||
return projectSlugs.map(slug => ({ | ||
slug, | ||
})); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
const Footer = () => ( | ||
<footer> | ||
<div className="text-center w-full flex justify-center py-4"> | ||
<p className="text-sm"> | ||
© {new Date().getFullYear()} Tim Kostolansky | ||
</p> | ||
</div> | ||
</footer> | ||
const Copyright = () => ( | ||
<div className="text-center w-full flex justify-center py-4"> | ||
<p className="text-sm"> | ||
© {new Date().getFullYear()} Tim Kostolansky | ||
</p> | ||
</div> | ||
) | ||
|
||
export default Footer | ||
export default Copyright |
Oops, something went wrong.