Add frontend technologies guide
This commit is contained in:
1 parent
bf734b0294
commit
faf70f6e35
4 files changed
+497
-1
No files matched your search
@@ -0,0 +1,32 @@
|
||||
---
|
||||
import GuideContent from '../../components/Guide/GuideContent.astro';
|
||||
import BaseLayout from '../../layouts/BaseLayout.astro';
|
||||
import { getGuideById } from '../../lib/guide';
|
||||
import { getOpenGraphImageUrl } from '../../lib/open-graph';
|
||||
|
||||
const guideId = 'frontend-technologies';
|
||||
const guide = await getGuideById(guideId).catch(() => null);
|
||||
if (!guide) {
|
||||
return Astro.redirect('/404');
|
||||
}
|
||||
|
||||
const { frontmatter: guideData } = guide!;
|
||||
|
||||
const ogImageUrl =
|
||||
guideData.seo.ogImageUrl ||
|
||||
getOpenGraphImageUrl({
|
||||
group: 'guide',
|
||||
resourceId: guideId,
|
||||
});
|
||||
---
|
||||
|
||||
<BaseLayout
|
||||
title={guideData.seo.title}
|
||||
description={guideData.seo.description}
|
||||
permalink={guide.frontmatter.excludedBySlug}
|
||||
canonicalUrl={guideData.canonicalUrl}
|
||||
ogImageUrl={ogImageUrl}
|
||||
>
|
||||
<GuideContent guide={guide!} />
|
||||
<div slot="changelog-banner" />
|
||||
</BaseLayout>
|
||||
Reference in new issue
Block a user