Skip to content

Commit c90c73b

Browse files
committed
Filter out drafts, update descriptions.
1 parent 67c1f4b commit c90c73b

File tree

5 files changed

+43
-9
lines changed

5 files changed

+43
-9
lines changed

src/components/SponsorCard.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const socialLinks = [
109109
{website && (
110110
<div class="website-btn-container flex flex-col sm:flex-row justify-center gap-2 mt-4">
111111

112-
{ !isSponsorPage &&
112+
{ !isSponsorPage && sponsor.body &&
113113
<a href={`/sponsor/${sponsor.id}`} class="website-btn-outline">
114114
About {title}
115115
</a>

src/content/sponsors/djangocon/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,14 @@ socials:
1616
bluesky:
1717
tier: Partners
1818
---
19+
20+
This is the 17th edition of the Conference and it is organized by a team made up
21+
of Django practitioners from all levels. We welcome people from all over the
22+
world.
23+
24+
Our conference seeks to educate and develop new skills, best practices, and
25+
ideas for the benefit of attendees, developers, speakers, and everyone in our
26+
global Django Community, not least those watching the talks online.
27+
28+
This year it will take place in the beautiful city of Dublin. Don't miss the
29+
chance to join us for five days of talks, workshops, and sprints.

src/pages/community-partners.astro

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { getCollection } from "astro:content";
33
import Layout from "@layouts/SectionLayout.astro";
44
import SponsorCard from "@components/SponsorCard.astro";
5+
import Headline from "@ui/Headline.astro";
56
67
const sponsors = await getCollection("sponsors", ({ data }) => {
78
const isProd = import.meta.env.MODE === "production";
@@ -16,11 +17,17 @@ const sponsors = await getCollection("sponsors", ({ data }) => {
1617
title="EuroPython 2025 | July 14th-20th 2025 | Prague, Czech Republic & Remote"
1718
description="EuroPython is the largest Python conference in Europe. We are looking forward to seeing you in Prague, Czech Republic & Remote from July 14th-20th 2025."
1819
>
19-
{sponsors.length > 0 && (
20-
<section class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 p-4 md:p-6">
21-
{sponsors.map((sponsor) => (
22-
<SponsorCard sponsor={sponsor.id} />
23-
))}
24-
</section>
25-
)}
20+
21+
22+
<Headline id="community-partners" title="Community partners" center=true />
23+
<p>
24+
EuroPython is a community-driven conference, we wouldn't be able to make as much impact without the support of our brilliant Community Partners. Get to know our partners better below (alphabetical order).
25+
</p>
26+
{sponsors.length > 0 && (
27+
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 p-4 md:p-6">
28+
{sponsors.map((sponsor) => (
29+
<SponsorCard sponsor={sponsor.id} />
30+
))}
31+
</div>
32+
)}
2633
</Layout>

src/pages/sponsor/[sponsor]/[job].astro

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,39 @@ import Layout from "@layouts/SectionLayout.astro";
33
import JobCard from "@components/JobCard.astro";
44
import SponsorCard from "@components/SponsorCard.astro";
55
import TwoCols from "@components/TwoCols.astro";
6+
import { getCollection } from "astro:content";
67
78
89
const { sponsor, job: jobId } = Astro.params;
910
1011
const job = `${sponsor}/${jobId}`;
1112
1213
export async function getStaticPaths() {
14+
15+
16+
const jobs = await getCollection("jobs", ({ data }) => {
17+
return import.meta.env.MODE === "production" ? data.draft !== true : true;
18+
});
19+
const jobIds = new Set(jobs.map((job) => job.id));
20+
1321
const jobFiles = import.meta.glob("@src/content/sponsors/*/!(index).md");
1422
return Object.keys(jobFiles)
1523
.map((path) => {
1624
const match = path.match(/\/sponsors\/([^/]+)\/([^/]+)\.md$/);
1725
if (!match) return null;
1826
1927
const [, sponsorId, jobId] = match;
28+
29+
if (!jobIds.has(`${sponsorId}/${jobId}`)) return null;
30+
2031
return {
2132
params: { sponsor: sponsorId, job: jobId },
2233
};
2334
})
2435
.filter(Boolean);
2536
}
37+
38+
2639
---
2740

2841
<Layout

src/pages/sponsor/[sponsor]/index.astro

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ import { getCollection } from "astro:content";
1010
const {sponsor } = Astro.params;
1111
1212
export async function getStaticPaths() {
13-
const sponsors = await getCollection("sponsors");
13+
14+
const sponsors = await getCollection("sponsors", ({ data }) => {
15+
return import.meta.env.MODE === "production" ? data.draft !== true : true;
16+
});
1417
1518
return sponsors.map((sponsor: any) => ({
1619
params: {

0 commit comments

Comments
 (0)