diff --git a/package.json b/package.json index 719a958..f0f4efd 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "build": "next build", "start": "next start", "lint": "next lint", - "static": "node script.js && next build && next export", - "custom-script": "node script.js" + "custom-script": "node script.js", + "static": "node script.js && next build && next export && touch ./out/.nojekyll && echo 'mbsaiaditya.github.io' > ./out/CNAME" }, "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.5.1", diff --git a/src/app/blogs/[blogid]/page.js b/src/app/blogs/[blogid]/page.js index fd4e3d1..a572b14 100644 --- a/src/app/blogs/[blogid]/page.js +++ b/src/app/blogs/[blogid]/page.js @@ -1,4 +1,5 @@ import BlogId from "@/components/blog/blogDetail"; +import jsonData from '../../../../public/blog-response.json' export default function BlogDetail({ params }){ return( @@ -7,7 +8,7 @@ export default function BlogDetail({ params }){ } export async function generateStaticParams() { - const posts = await fetch('/blog-response.json').then((res) => res.json()) + const posts = jsonData return posts.items.map((post) => ({ blogid: post.blog_slug, diff --git a/src/app/events/[eventid]/page.js b/src/app/events/[eventid]/page.js index b142176..5bacaa4 100644 --- a/src/app/events/[eventid]/page.js +++ b/src/app/events/[eventid]/page.js @@ -1,4 +1,5 @@ import EventId from "@/components/event/eventDetail"; +import jsonData from '../../../../public/event-response.json' export default function EventDetail({ params }){ return( @@ -7,7 +8,7 @@ export default function EventDetail({ params }){ } export async function generateStaticParams() { - const posts = await fetch('/event-response.json').then((res) => res.json()) + const posts = jsonData return posts.items.map((post) => ({ eventid: post.event_slug, diff --git a/src/app/projects/[projectid]/page.jsx b/src/app/projects/[projectid]/page.jsx index 932413d..8fc58b0 100644 --- a/src/app/projects/[projectid]/page.jsx +++ b/src/app/projects/[projectid]/page.jsx @@ -1,4 +1,5 @@ import ProjectId from "@/components/project/projectDetail"; +import jsonData from '../../../../public/project-response.json' export default function ProjectDetail({ params }){ return( @@ -7,8 +8,8 @@ export default function ProjectDetail({ params }){ } export async function generateStaticParams() { - const posts = await fetch('/project-response.json').then((res) => res.json()) - + const posts = jsonData + return posts.items.map((post) => ({ projectid: post.project_slug, })) diff --git a/src/components/Navbar/Navbar.js b/src/components/Navbar/Navbar.js index c6c9cad..97353cf 100644 --- a/src/components/Navbar/Navbar.js +++ b/src/components/Navbar/Navbar.js @@ -62,15 +62,6 @@ const Navbar = () => { Projects -
  • - - Location - -
  • - {projectData.project_authors} + {projectData.project_authors}