diff --git a/src/app/(hayao)/something/[slug]/page.tsx b/src/app/(hayao)/something/[slug]/page.tsx index 005d478..3a72b96 100644 --- a/src/app/(hayao)/something/[slug]/page.tsx +++ b/src/app/(hayao)/something/[slug]/page.tsx @@ -10,12 +10,13 @@ export const generateStaticParams = () => { }; }); - //console.log(postlist); + // console.log(postlist); return params; }; export default function Projects(hoge: { params: { slug: string } }) { + console.log(hoge); const postElement = getProjectFromURL(hoge.params.slug); return postElement ? {postElement} :
404
; diff --git a/src/lib/projects/index.tsx b/src/lib/projects/index.tsx index e0d559a..b238bcc 100644 --- a/src/lib/projects/index.tsx +++ b/src/lib/projects/index.tsx @@ -16,11 +16,15 @@ export const getFetchedProjectPostList = () => { export const getProjectFromURL = (url: string) => { const mdFile = findMarkdownFromURL(projectsDir, url); + // console.log(mdFile); if (mdFile) { - const projPost = getPostDataFromFile(mdFile); - // Todo: basepathは多分間違ってる - return ; + const projPost = getPostDataFromFile(mdFile, { + cutHead: process.cwd().split(path.sep).length + 5, + }); + // TODO: basepathがあってるか確認する + + return ; } else { return undefined; }