feat/roadmap-slug
Kamran Ahmed 11 months ago
parent 3d012f9c64
commit 4a3030948f
  1. 2
      src/lib/roadmap.ts
  2. 2
      src/lib/video.ts
  3. 2
      src/pages/v1-stats.json.ts

@ -133,7 +133,7 @@ export async function getRoadmapsByIds(
export async function getRoadmapFaqsById(roadmapId: string): Promise<string[]> {
const { faqs } = await import(
`/src/data/roadmaps/${roadmapId}/faqs.astro`
`../data/roadmaps/${roadmapId}/faqs.astro`
).catch(() => ({}));
return faqs || [];

@ -64,7 +64,7 @@ export async function getAllVideos(): Promise<VideoFileType[]> {
}
export async function getVideoById(id: string): Promise<VideoFileType> {
const video = await import(`/src/data/videos/${id}.md`);
const video = await import(`../data/videos/${id}.md`);
return {
...video,

@ -1,5 +1,7 @@
import { execSync } from 'child_process';
export const prerender = true;
export async function GET() {
const commitHash = execSync('git rev-parse HEAD').toString().trim();
const commitDate = execSync('git log -1 --format=%cd').toString().trim();

Loading…
Cancel
Save