17
src/pages/projects/[project].astro
Normal file
17
src/pages/projects/[project].astro
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
import ProjectPage from "../../components/projects/ProjectPage.astro"
|
||||
import { type GetStaticPathsResult } from "astro"
|
||||
|
||||
export const prerender = true
|
||||
|
||||
export function getStaticPaths(): GetStaticPathsResult {
|
||||
return [
|
||||
{ params: { project: "hotelservice" } },
|
||||
{ params: { project: "homepage" } }
|
||||
]
|
||||
}
|
||||
|
||||
const { project } = Astro.params
|
||||
---
|
||||
|
||||
<ProjectPage project={project as string} />
|
11
src/pages/projects/index.astro
Normal file
11
src/pages/projects/index.astro
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
import { getCollection } from "astro:content"
|
||||
import Layout from "@/layouts/Layout.astro"
|
||||
import MyProjectsPage from "@/components/projects/MyProjectsPage.astro"
|
||||
|
||||
const projects = await getCollection("projects")
|
||||
---
|
||||
|
||||
<Layout title="Prosjekter">
|
||||
<MyProjectsPage projects={projects} />
|
||||
</Layout>
|
Reference in New Issue
Block a user