Skip to content

Commit edb0ffc

Browse files
committed
Add markdown content from old page with toc
1 parent d954bc5 commit edb0ffc

File tree

3 files changed

+26
-12
lines changed

3 files changed

+26
-12
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
import Markdown from "@ui/Markdown.astro";
3+
4+
const content = await Astro.slots.render('default')
5+
6+
---
7+
8+
<Markdown content={content} />
File renamed without changes.

src/pages/sprints.astro

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
11
---
22
import { getCollection } from 'astro:content';
3-
import Layout from '@layouts/SectionLayout.astro';
3+
import { getEntry, render } from 'astro:content';
4+
import Layout from '@layouts/MarkdownLayout.astro';
45
import SprintCard from '@components/SprintCard.astro';
56
import Headline from "@ui/Headline.astro"
7+
import Markdown from "@ui/Markdown.astro";
8+
import TwoCols from "@components/TwoCols.astro";
9+
import Prose from "@ui/Prose.astro";
10+
11+
const entry = await getEntry('pages', 'sprints_info');
12+
13+
if (!entry) {
14+
throw new Error('Could not find page entry.');
15+
}
16+
17+
console.log(entry)
18+
const { Content } = await render(entry);
619
720
const sprints = await getCollection("sprints", ({ data }) => {
821
return import.meta.env.MODE === "production" ? data.draft !== true : true;
922
});
1023
1124
---
1225

13-
<Layout title="Sprints & Workshops" description="All in one">
14-
<header class="text-center mb-12">
15-
<Headline title="Sprints & Workshops" />
16-
<p class="text-xl text-gray-600 max-w-2xl mx-auto leading-relaxed">
17-
Join collaborative coding sessions and hands-on workshops.
18-
Connect with maintainers, contribute to open source projects,
19-
and learn new skills alongside fellow Python enthusiasts.
20-
</p>
21-
</header>
22-
23-
<div class="flex flex-wrap gap-8 justify-center mb-8">
26+
<Layout title=`${entry.title}` description=`${entry.description}` toc=true>
27+
28+
<Markdown content={entry.body} />
29+
<div class="flex flex-wrap gap-8 justify-center my-8">
2430
<div class="flex flex-col gap-2">
2531
<label for="level-filter" class="font-semibold text-gray-700 text-lg">Python Level:</label>
2632
<select id="level-filter" class="px-4 py-2 border border-gray-300 rounded-lg bg-white text-lg min-w-[150px] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">

0 commit comments

Comments
 (0)