1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-25 18:20:46 +02:00

Rearrange best practices pages

This commit is contained in:
Kamran Ahmed
2023-01-24 02:03:15 +04:00
parent c2dda3bc35
commit 813a3d9b2b

View File

@@ -1,14 +1,14 @@
--- ---
import BestPracticeHeader from '../../components/BestPracticeHeader.astro'; import BestPracticeHeader from '../../../components/BestPracticeHeader.astro';
import CaptchaScripts from '../../components/Captcha/CaptchaScripts.astro'; import CaptchaScripts from '../../../components/Captcha/CaptchaScripts.astro';
import FrameRenderer from '../../components/FrameRenderer/FrameRenderer.astro'; import FrameRenderer from '../../../components/FrameRenderer/FrameRenderer.astro';
import MarkdownFile from '../../components/MarkdownFile.astro'; import MarkdownFile from '../../../components/MarkdownFile.astro';
import ShareIcons from '../../components/ShareIcons/ShareIcons.astro'; import ShareIcons from '../../../components/ShareIcons/ShareIcons.astro';
import TopicOverlay from '../../components/TopicOverlay/TopicOverlay.astro'; import TopicOverlay from '../../../components/TopicOverlay/TopicOverlay.astro';
import UpcomingForm from '../../components/UpcomingForm.astro'; import UpcomingForm from '../../../components/UpcomingForm.astro';
import BaseLayout from '../../layouts/BaseLayout.astro'; import BaseLayout from '../../../layouts/BaseLayout.astro';
import { BestPracticeFrontmatter, getBestPracticeIds } from '../../lib/best-pratice'; import { BestPracticeFrontmatter, getBestPracticeIds } from '../../../lib/best-pratice';
import { generateArticleSchema } from '../../lib/jsonld-schema'; import { generateArticleSchema } from '../../../lib/jsonld-schema';
export async function getStaticPaths() { export async function getStaticPaths() {
const bestPracticeIds = await getBestPracticeIds(); const bestPracticeIds = await getBestPracticeIds();
@@ -23,7 +23,7 @@ interface Params extends Record<string, string | undefined> {
} }
const { bestPracticeId } = Astro.params as Params; const { bestPracticeId } = Astro.params as Params;
const bestPracticeFile = await import(`../../best-practices/${bestPracticeId}/${bestPracticeId}.md`); const bestPracticeFile = await import(`../../../best-practices/${bestPracticeId}/${bestPracticeId}.md`);
const bestPracticeData = bestPracticeFile.frontmatter as BestPracticeFrontmatter; const bestPracticeData = bestPracticeFile.frontmatter as BestPracticeFrontmatter;
let jsonLdSchema = []; let jsonLdSchema = [];