Skip to content

Commit a611d87

Browse files
Merge branch 'ep2025' into ep2025-speakers-dinner
2 parents 0c0bfb1 + 2986d4c commit a611d87

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+570
-414
lines changed

.env.development

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
EP_SESSIONS_API="https://static.europython.eu/programme/ep2025/releases/current/sessions.json"
2+
EP_SPEAKERS_API="https://static.europython.eu/programme/ep2025/releases/current/speakers.json"

.env.preview

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
EP_SESSIONS_API="https://static.europython.eu/programme/ep2025/releases/current/sessions.json"
2+
EP_SPEAKERS_API="https://static.europython.eu/programme/ep2025/releases/current/speakers.json"

.env.production

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
EP_SESSIONS_API="https://static.europython.eu/programme/ep2025/releases/current/sessions.json"
2+
EP_SPEAKERS_API="https://static.europython.eu/programme/ep2025/releases/current/speakers.json"

.github/workflows/preview.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,21 @@ jobs:
3232
- name: Install dependencies
3333
run: make install
3434

35+
- name: Get current branch name
36+
run: |
37+
BRANCH_NAME=$(make safe_branch BRANCH=$GITHUB_BRANCH_NAME)
38+
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
39+
3540
- name: Build the website
36-
run: make build PREVIEW=true
41+
run:
42+
make build PREVIEW=true
43+
SITE_URL="https://${BRANCH_NAME}.ep-preview.click"
3744

3845
- name: Set up SSH key
3946
uses: webfactory/[email protected]
4047
with:
4148
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
4249

43-
- name: Get current branch name
44-
run: |
45-
BRANCH_NAME=$(make safe_branch BRANCH=$GITHUB_BRANCH_NAME)
46-
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
47-
4850
- name: ssh keyscan
4951
run: ssh-keyscan "static.europython.eu" > ~/.ssh/known_hosts
5052

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ dmypy.json
128128
.pyre/
129129

130130
.vscode/
131+
.idea/
131132
out/
132133
.next/
133134
.DS_Store
@@ -138,3 +139,6 @@ storybook-static/
138139
# Sentry Auth Token
139140
.sentryclirc
140141
.astro
142+
143+
# EuroPython website
144+
src/content/days

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ build:
2020
commands:
2121
- npm install -g pnpm@latest-10
2222
- make install
23-
- make build PREVIEW=true
23+
- make build PREVIEW=true SITE_URL=$READTHEDOCS_CANONICAL_URL
2424
- mkdir -p $READTHEDOCS_OUTPUT/html
2525
- cd dist && cp -r * $READTHEDOCS_OUTPUT/html

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ VPS_HOST ?= static.europython.eu
66
VPS_PROD_PATH ?= /home/static_content_user/content/europython_websites/ep2025
77
VPS_PREVIEW_PATH ?= /home/static_content_user/content/previews
88
REMOTE_CMD=ssh $(VPS_USER)@$(VPS_HOST)
9+
PREVIEW_SITE_URL ?= "https://$(SAFE_BRANCH).ep-preview.click"
910

1011
# Variables for build/deploy
1112
# ==========================
@@ -19,10 +20,10 @@ BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
1920
# Replace "/" and other non-alphanumeric characters with "-"
2021
SAFE_BRANCH := $(shell echo "$(BRANCH)" | sed 's/[^A-Za-z0-9-]/-/g')
2122
FORCE_DEPLOY ?= false
23+
SITE_URL ?= "https://$(SAFE_BRANCH).ep-preview.click"
2224

2325
.PHONY: build deploy dev clean install
2426

25-
2627
safe_branch:
2728
@echo $(SAFE_BRANCH)
2829

@@ -47,12 +48,14 @@ build:
4748
preview: RELEASES_DIR = $(VPS_PREVIEW_PATH)/$(SAFE_BRANCH)/releases
4849
preview: TARGET = $(RELEASES_DIR)/$(TIMESTAMP)
4950
preview:
51+
@echo "Preview site URL: $(PREVIEW_SITE_URL)"
5052
echo $(TARGET)
5153
@echo "\n\n**** Deploying preview of a branch '$(BRANCH)' (safe: $(SAFE_BRANCH)) to $(TARGET)...\n\n"
5254
$(REMOTE_CMD) "mkdir -p $(TARGET)"
5355
rsync -avz --delete ./dist/ $(VPS_USER)@$(VPS_HOST):$(TARGET)/
5456
$(REMOTE_CMD) "cd $(RELEASES_DIR) && ln -snf $(TIMESTAMP) current"
5557
@echo "\n\n**** Preview complete.\n\n"
58+
@echo "Open the preview site at: $(PREVIEW_SITE_URL)\n\n"
5659

5760

5861
ifeq ($(FORCE_DEPLOY), true)

astro.config.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import rehypeAutolinkHeadings from "rehype-autolink-headings";
1010
import metaTags from "astro-meta-tags";
1111
import pagefind from "astro-pagefind";
1212
import deleteUnusedImages from "astro-delete-unused-images";
13+
import preload from "astro-preload";
1314

1415
// https://astro.build/config
1516
export default defineConfig({
@@ -19,6 +20,7 @@ export default defineConfig({
1920
},
2021
resolve: {
2122
alias: {
23+
"@utils": path.resolve("./src/utils"),
2224
"@data": path.resolve("./src/data"),
2325
"@components": path.resolve("./src/components"),
2426
"@sections": path.resolve("./src/components/sections"),
@@ -59,9 +61,10 @@ export default defineConfig({
5961
"/sponsor/": "/sponsorship/sponsor/",
6062
"/voting/": "/programme/voting/",
6163
"/wasm-summit/": "/programme/wasm-summit/",
62-
"/sessions/": "/programme/sessions/",
64+
"/programme/sessions/": "/sessions/",
6365
},
6466
integrations: [
67+
preload(),
6568
mdx(),
6669
sitemap(),
6770
react(),
@@ -76,6 +79,10 @@ export default defineConfig({
7679
build: {
7780
minify: true,
7881
},
82+
image: {
83+
remotePatterns: [{ protocol: "https" }],
84+
domains: ["programme.europython.eu", "placehold.co"],
85+
},
7986
experimental: {
8087
svg: true,
8188
},

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@
2525
"astro-delete-unused-images": "^1.0.3",
2626
"astro-meta-tags": "^0.3.1",
2727
"astro-pagefind": "^1.8.1",
28+
"astro-preload": "^1.1.2",
2829
"clsx": "^2.1.1",
2930
"date-fns": "^4.1.0",
3031
"date-fns-tz": "^3.2.0",
3132
"hastscript": "^9.0.0",
33+
"js-yaml": "^4.1.0",
34+
"marked": "^15.0.7",
3235
"pagefind": "^1.3.0",
3336
"react": "^19.1.0",
3437
"react-dom": "^19.1.0",
@@ -40,6 +43,7 @@
4043
"typescript": "^5.8.3"
4144
},
4245
"devDependencies": {
46+
"@types/js-yaml": "^4.0.9",
4347
"prettier": "^3.4.2",
4448
"prettier-plugin-astro": "^0.14.1"
4549
},

pnpm-lock.yaml

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)