Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,8 @@ export default defineConfig({
},
site: process.env.SITE_URL || "https://ep2025.europython.eu",
redirects: {
"/c-api-summit/": "/programme/c-api-summit/",
"/cfp/": "/programme/cfp/",
"/planning/": "https://forms.gle/riw6CvML8ck94A4V9",
"/reviewers/": "https://forms.gle/4GTJjwZ1nHBGetM18",
"/rust-summit/": "/programme/rust-summit/",
"/sponsor/": "/sponsorship/sponsor/",
"/voting/": "/programme/voting/",
"/wasm-summit/": "/programme/wasm-summit/",
"/programme/sessions/": "/sessions/",
},
integrations: [
preload(),
Expand Down
2 changes: 1 addition & 1 deletion src/content/deadlines/00_cfp.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Call for Proposals
subtitle: Extended until February 3rd
url: /programme/cfp
url: /cfp
image: "./cfp.jpg"
---

Expand Down
2 changes: 1 addition & 1 deletion src/content/deadlines/00_mentorship.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Speaker Mentorship
subtitle: Open until 21st January
url: /programme/mentorship
url: /mentorship
image: mentorship1.jpg
---

Expand Down
2 changes: 1 addition & 1 deletion src/content/deadlines/00_voting.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Community Voting
subtitle: Closed on February 17th
url: /programme/voting/
url: /voting/
image: voting.jpg
---

Expand Down
14 changes: 7 additions & 7 deletions src/data/links.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@
},
{
"name": "Tracks",
"path": "/programme/tracks"
"path": "/tracks"
},
{
"name": "Selection Process",
"path": "/programme/selection"
"path": "/selection"
},
{
"name": "Community Voting",
"path": "/programme/voting"
"path": "/voting"
},
{
"name": "Speaker Mentorship",
"path": "/programme/mentorship"
"path": "/mentorship"
},
{
"name": "C API Summit",
"path": "/programme/c-api-summit"
"path": "/c-api-summit"
},
{
"name": "WebAssembly Summit",
"path": "/programme/wasm-summit"
"path": "/wasm-summit"
},
{
"name": "Rust Summit",
"path": "/programme/rust-summit"
"path": "/rust-summit"
}
]
},
Expand Down
23 changes: 18 additions & 5 deletions src/pages/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,25 @@ import SponsorTiers from "../components/sponsor-tiers/sponsor-tiers.astro";
import Accordion from "../components/accordion/accordion.astro";

export async function getStaticPaths() {
const posts = await getCollection("pages");
return posts.map((post) => ({
params: { slug: post.slug },
props: post,
}));
const pages = await getCollection("pages");

return pages.flatMap((page) => {
const slugParts = page.slug.split("/");
const shortSlug = slugParts[slugParts.length - 1];

const paths = [
{ params: { slug: page.slug }, props: page }, // long slug
];

// only add short slug if it's not the same
if (page.slug !== shortSlug) {
paths.push({ params: { slug: shortSlug }, props: page }); // short slug
}

return paths;
});
}

type Props = CollectionEntry<"pages">;

const post = Astro.props;
Expand Down