Skip to content

Commit 3102b38

Browse files
authored
Short links. (#1135)
Short links for pages. Menu have links tree structure, dead links and redirects are covered in astro config. Close #1002
1 parent 553b11a commit 3102b38

File tree

9 files changed

+39
-33
lines changed

9 files changed

+39
-33
lines changed

astro.config.mjs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,8 @@ export default defineConfig({
5353
},
5454
site: process.env.SITE_URL || "https://ep2025.europython.eu",
5555
redirects: {
56-
"/c-api-summit/": "/programme/c-api-summit/",
57-
"/cfp/": "/programme/cfp/",
5856
"/planning/": "https://forms.gle/riw6CvML8ck94A4V9",
5957
"/reviewers/": "https://forms.gle/4GTJjwZ1nHBGetM18",
60-
"/rust-summit/": "/programme/rust-summit/",
61-
"/sponsor/": "/sponsorship/sponsor/",
62-
"/voting/": "/programme/voting/",
63-
"/wasm-summit/": "/programme/wasm-summit/",
64-
"/programme/sessions/": "/sessions/",
6558
},
6659
integrations: [
6760
preload(),

src/content/deadlines/00_cfp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Call for Proposals
33
subtitle: Extended until February 3rd
4-
url: /programme/cfp
4+
url: /cfp
55
image: "./cfp.jpg"
66
---
77

src/content/deadlines/00_mentorship.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Speaker Mentorship
33
subtitle: Open until 21st January
4-
url: /programme/mentorship
4+
url: /mentorship
55
image: mentorship1.jpg
66
---
77

src/content/deadlines/00_voting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Community Voting
33
subtitle: Closed on February 17th
4-
url: /programme/voting/
4+
url: /voting/
55
image: voting.jpg
66
---
77

src/content/pages/faq.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ subtitle: Frequently Asked Questions about EuroPython
99

1010
<ul className="milestone-done">
1111
<li>**12 December 2024** Call for Teams starts</li>
12-
<li>**10 January 2025** [Call for Proposals (CfP)](/programme/cfp/) opens</li>
13-
<li>**11 January 2025** [Speaker Mentorship Programme](/programme/mentorship/) sign-up opens</li>
12+
<li>**10 January 2025** [Call for Proposals (CfP)](/cfp) opens</li>
13+
<li>**11 January 2025** [Speaker Mentorship Programme](/mentorship) sign-up opens</li>
1414
<li>**21 January 2025:** Speaker Mentorship signup closes</li>
1515
<li>**30 January 2025:** [Call for Reviewers](https://forms.gle/4GTJjwZ1nHBGetM18) & review process begin</li>
1616
<li>**3 February 2025:** Extended Call for Proposals (CfP) closes</li>
1717
<li>**5 February 2025:** Proposal Review process starts</li>
18-
<li>**6 February 2025:** [Community Voting](/programme/voting/) starts</li>
18+
<li>**6 February 2025:** [Community Voting](/voting) starts</li>
1919
<li>**17 February 2025:** Community Voting and Review ends</li>
20-
<li>**8 March 2025** [Financial Aid](/finaid/) Programme starts</li>
20+
<li>**8 March 2025** [Financial Aid](/finaid) Programme starts</li>
2121
<li>**11 March 2025:** [Sponsorship](/sponsor) Sign-up Starts</li>
2222
<li>**27 March 2025:** [Ticket sales](/tickets) open!</li>
2323
<li>**February/March 2025** Programme selection process</li>
@@ -157,9 +157,9 @@ Share your ideas with the programme team at [[email protected]](mailto:pro
157157

158158
<Accordion title="When can I submit a talk proposal?" id="submit">
159159

160-
Sadly, at this point you cannot. The [Call for Proposals (CfP)](/programme/cfp) was open from **the 10th of January to the 3rd of February 2025** (including an extension of the original deadline).
160+
Sadly, at this point you cannot. The [Call for Proposals (CfP)](/cfp) was open from **the 10th of January to the 3rd of February 2025** (including an extension of the original deadline).
161161

162-
Need support with your submission? Explore our [Speaker Mentorship Programme](/programme/mentorship/) for guidance.
162+
Need support with your submission? Explore our [Speaker Mentorship Programme](/mentorship) for guidance.
163163

164164
</Accordion>
165165

@@ -169,7 +169,7 @@ Need support with your submission? Explore our [Speaker Mentorship Programme](/p
169169

170170
Once the CfP closes, all proposals go through **community voting and two rounds of review and refinement** to finalise the programme.
171171

172-
Learn more about our selection process [here](/programme/selection/).
172+
Learn more about our selection process [here](/selection).
173173

174174

175175
</Accordion>
@@ -181,7 +181,7 @@ Learn more about our selection process [here](/programme/selection/).
181181

182182
Speakers needing travel support are encouraged to apply for [Financial Aid](/finaid).
183183

184-
We actively support first-time speakers and welcome participation from under-represented groups in tech. Learn more through our [Speaker Mentorship Programme](/programme/mentorship).
184+
We actively support first-time speakers and welcome participation from under-represented groups in tech. Learn more through our [Speaker Mentorship Programme](/mentorship).
185185

186186
Got any questions? Reach out to us at [[email protected]](mailto:[email protected]).
187187

src/content/pages/programme/cfp.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ If you’re thinking, “but they don’t mean me”, then we especially mean **
2929
* If you think you’re an imposter, join us — many of the EuroPython organisers feel this way.
3030
* This is a volunteer-led community, so join us — you will be welcomed with friendship, support and compassion.
3131

32-
To get some inspiration for talk ideas, check out the [tracks](https://ep2025.europython.eu/programme/tracks/) we're running this year. We also run a [mentorship program](https://ep2025.europython.eu/programme/mentorship/) to help people with their proposals: we'd love to hear from you if you want to sign up as a mentor or mentee.
32+
To get some inspiration for talk ideas, check out the [tracks](/tracks) we're running this year. We also run a [mentorship program](/mentorship) to help people with their proposals: we'd love to hear from you if you want to sign up as a mentor or mentee.
3333

34-
Finally, you can find out more about the [selection process](https://ep2025.europython.eu/programme/selection/) all talks go through after submission.
34+
Finally, you can find out more about the [selection process](/selection) all talks go through after submission.
3535

3636
## How to write a proposal
3737

src/content/pages/programme/voting.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ one that has been used for any of the following:
4949

5050
- Go to the [Community Voting page](https://voting.europython.eu).
5151
- Enter an eligible email address (see [Who can
52-
participate](/programme/voting/#who-can-participate) above).
52+
participate](/voting/#who-can-participate) above).
5353
- If the email is known to us, you will receive an email with a confirmation
5454
link.
5555
- Check your inbox (and spam) for the email with the confirmation link - click

src/data/links.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,31 @@
1313
},
1414
{
1515
"name": "Tracks",
16-
"path": "/programme/tracks"
16+
"path": "/tracks"
1717
},
1818
{
1919
"name": "Selection Process",
20-
"path": "/programme/selection"
20+
"path": "/selection"
2121
},
2222
{
2323
"name": "Community Voting",
24-
"path": "/programme/voting"
24+
"path": "/voting"
2525
},
2626
{
2727
"name": "Speaker Mentorship",
28-
"path": "/programme/mentorship"
28+
"path": "/mentorship"
2929
},
3030
{
3131
"name": "C API Summit",
32-
"path": "/programme/c-api-summit"
32+
"path": "/c-api-summit"
3333
},
3434
{
3535
"name": "WebAssembly Summit",
36-
"path": "/programme/wasm-summit"
36+
"path": "/wasm-summit"
3737
},
3838
{
3939
"name": "Rust Summit",
40-
"path": "/programme/rust-summit"
40+
"path": "/rust-summit"
4141
}
4242
]
4343
},

src/pages/[...slug].astro

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,25 @@ import SponsorTiers from "../components/sponsor-tiers/sponsor-tiers.astro";
1717
import Accordion from "../components/accordion/accordion.astro";
1818
1919
export async function getStaticPaths() {
20-
const posts = await getCollection("pages");
21-
return posts.map((post) => ({
22-
params: { slug: post.slug },
23-
props: post,
24-
}));
20+
const pages = await getCollection("pages");
21+
22+
return pages.flatMap((page) => {
23+
const slugParts = page.slug.split("/");
24+
const shortSlug = slugParts[slugParts.length - 1];
25+
26+
const paths = [
27+
{ params: { slug: page.slug }, props: page }, // long slug
28+
];
29+
30+
// only add short slug if it's not the same
31+
if (page.slug !== shortSlug) {
32+
paths.push({ params: { slug: shortSlug }, props: page }); // short slug
33+
}
34+
35+
return paths;
36+
});
2537
}
38+
2639
type Props = CollectionEntry<"pages">;
2740
2841
const post = Astro.props;

0 commit comments

Comments
 (0)