computer-scienceangular-roadmapbackend-roadmapblockchain-roadmapdba-roadmapdeveloper-roadmapdevops-roadmapfrontend-roadmapgo-roadmaphactoberfestjava-roadmapjavascript-roadmapnodejs-roadmappython-roadmapqa-roadmapreact-roadmaproadmapstudy-planvue-roadmapweb3-roadmap
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
934 B
38 lines
934 B
--- |
|
import GuideHeader from '../../components/GuideHeader.astro'; |
|
import MarkdownFile from '../../components/MarkdownFile.astro'; |
|
import BaseLayout from '../../layouts/BaseLayout.astro'; |
|
import { getAllGuides, type GuideFileType } from '../../lib/guide'; |
|
|
|
export interface Props { |
|
guide: GuideFileType; |
|
} |
|
|
|
export async function getStaticPaths() { |
|
const guides = await getAllGuides(); |
|
|
|
return guides.map((guide) => ({ |
|
params: { guideId: guide.id }, |
|
props: { guide }, |
|
})); |
|
} |
|
|
|
const { guideId } = Astro.params; |
|
const { guide } = Astro.props; |
|
const { frontmatter: guideData } = guide; |
|
--- |
|
|
|
<BaseLayout |
|
title={guideData.seo.title} |
|
description={guideData.seo.description} |
|
permalink={`/guides/${guideId}`} |
|
canonicalUrl={guideData.canonicalUrl} |
|
> |
|
<GuideHeader guide={guide} /> |
|
|
|
<div class='mx-auto max-w-[700px] py-5 sm:py-10'> |
|
<MarkdownFile> |
|
<guide.Content /> |
|
</MarkdownFile> |
|
</div> |
|
</BaseLayout>
|
|
|