Skip to content

Commit 2448e7e

Browse files
committed
fix: routes and worflow
1 parent 91ca126 commit 2448e7e

7 files changed

Lines changed: 25 additions & 13 deletions

File tree

‎.github/workflows/quality.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ jobs:
4141
run: pnpm exec playwright install --with-deps chromium
4242

4343
- name: Ejecutar desafíos Python
44+
env:
45+
DEPLOY_TARGET: local
4446
run: pnpm test:python
4547

46-
- name: Construir sitio
48+
- name: Construir sitio para GitHub Pages
49+
env:
50+
DEPLOY_TARGET: github-pages
4751
run: pnpm build

‎src/components/home/HomeHeader.astro‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
---
22
import GitHubAuth from "@/components/auth/GitHubAuth.astro";
3+
import { withBase } from "@/lib/paths";
34
---
45

56
<header class="relative flex items-center justify-between py-5">
67
<a
7-
href="/"
8+
href={withBase("/")}
89
aria-label="Ir al inicio de PySchool"
910
class="focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-brand"
1011
>
1112
<img
12-
src="/brand/pythonchile.png"
13+
src={withBase("/brand/pythonchile.png")}
1314
alt="Python Chile"
1415
class="h-9 w-auto object-contain sm:h-10"
1516
/>

‎src/components/home/hero/HeroCover.astro‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
import { withBase } from "@/lib/paths";
3+
---
4+
15
<div class="relative">
26
<div
37
aria-hidden="true"
@@ -6,7 +10,7 @@
610
</div>
711

812
<img
9-
src="/brand/pyschool-cover.png"
13+
src={withBase("/brand/pyschool-cover.png")}
1014
alt="Logo de PySchool"
1115
class="relative h-44 max-w-full w-auto object-contain sm:h-52"
1216
/>

‎src/components/station/StationHeader.astro‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
import GitHubAuth from "@/components/auth/GitHubAuth.astro";
33
import { stations } from "@/data/stations/registry";
4+
import { withBase } from "@/lib/paths";
45
56
interface Props {
67
station: string;
@@ -14,19 +15,19 @@ const { station } = Astro.props;
1415
>
1516
<div class="flex min-w-0 items-center gap-4 sm:gap-5">
1617
<a
17-
href="/"
18+
href={withBase("/")}
1819
aria-label="Ir al inicio de PySchool"
1920
class="shrink-0 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-brand"
2021
>
2122
<img
22-
src="/brand/pythonchile.png"
23+
src={withBase("/brand/pythonchile.png")}
2324
alt="Python Chile"
2425
class="h-8 w-auto object-contain sm:h-10"
2526
/>
2627
</a>
2728

2829
<a
29-
href="/"
30+
href={withBase("/")}
3031
class="hidden items-center gap-2 border-l border-ink/15 pl-5 text-sm font-semibold text-muted transition-colors hover:text-brand focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-brand sm:inline-flex"
3132
>
3233
<span aria-hidden="true" class="font-mono text-base">←</span>
@@ -69,15 +70,15 @@ const { station } = Astro.props;
6970
return (
7071
<li>
7172
<a
72-
href={item.href}
73+
href={withBase(item.href)}
7374
aria-current={isCurrent ? "page" : undefined}
7475
class:list={[
7576
"group/item flex items-center gap-3 rounded-lg p-2 transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand",
7677
isCurrent ? "bg-brand/8" : "hover:bg-accent/20",
7778
]}
7879
>
7980
<img
80-
src={item.image}
81+
src={withBase(item.image)}
8182
alt=""
8283
width="112"
8384
height="112"

‎src/layouts/StationLayout.astro‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import "../styles/global.css";
44
import CodeBlock from "@/components/station/CodeBlock.astro";
55
import StationHeader from "@/components/station/StationHeader.astro";
66
import StationSidebar from "@/components/station/StationSidebar.astro";
7+
import { withBase } from "@/lib/paths";
78
89
interface Props {
910
currentPath: string;
@@ -19,7 +20,7 @@ const { currentPath, station, title } = Astro.props;
1920
<meta charset="UTF-8" />
2021
<meta name="viewport" content="width=device-width" />
2122
<meta name="description" content={`${title} — ${station} | PySchool`} />
22-
<link rel="icon" type="image/png" href="/favicon.png" />
23+
<link rel="icon" type="image/png" href={withBase("/favicon.png")} />
2324
<title>{title} | PySchool</title>
2425
</head>
2526

‎src/pages/cuenta.astro‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import "@/styles/global.css";
33
44
import HomeHeader from "@/components/home/HomeHeader.astro";
55
import { stationNavigations } from "@/data/stations/registry";
6-
6+
import { withBase } from "@/lib/paths";
77
const stationGroups = Object.values(stationNavigations).map((navigation) => ({
88
code: navigation.code,
99
title: navigation.title,
@@ -22,7 +22,7 @@ const stationGroups = Object.values(stationNavigations).map((navigation) => ({
2222
<meta charset="UTF-8" />
2323
<meta name="viewport" content="width=device-width" />
2424
<meta name="description" content="Tu progreso y cuenta de PySchool." />
25-
<link rel="icon" type="image/png" href="/favicon.png" />
25+
<link rel="icon" type="image/png" href={withBase("/favicon.png")} />
2626
<title>Mi cuenta | PySchool</title>
2727
</head>
2828

‎src/pages/index.astro‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Hero from "@/components/home/hero/Hero.astro";
66
import HomeFooter from "@/components/home/HomeFooter.astro";
77
import HomeHeader from "@/components/home/HomeHeader.astro";
88
import HomeStations from "@/components/home/HomeStations.astro";
9+
import { withBase } from "@/lib/paths";
910
---
1011

1112
<html lang="es">
@@ -16,7 +17,7 @@ import HomeStations from "@/components/home/HomeStations.astro";
1617
name="description"
1718
content="PySchool: aprende Python resolviendo estaciones interactivas."
1819
/>
19-
<link rel="icon" type="image/png" href="/favicon.png" />
20+
<link rel="icon" type="image/png" href={withBase("/favicon.png")} />
2021
<title>PySchool — Python Chile</title>
2122
</head>
2223

0 commit comments

Comments
 (0)