Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:

- name: Build
run: pnpm exec nx run website:build
env:
BASE_URL: /visomi.dev/
Comment on lines +50 to +51

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Prefix app links before forcing a Pages base path

Setting BASE_URL here makes Astro build the site under /visomi.dev/, but our route helper still returns root-relative paths like /projects/ (apps/website/src/i18n/translations.ts:31-36), and those are used throughout the navbar/locale switcher (apps/website/src/components/navbar.astro). On the deployed GitHub Pages URL, clicking any internal link will navigate to https://<host>/projects/ instead of https://<host>/visomi.dev/projects/, so navigation 404s. Astro’s own Pages guidance requires internal links to include the configured base, so this workflow change breaks project-pages deployments as soon as it ships.

Useful? React with 👍 / 👎.


- name: Setup Pages
uses: actions/configure-pages@v5
Expand Down
6 changes: 1 addition & 5 deletions apps/website/src/components/background.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
import backgroundScriptUrl from '../scripts/background.ts?url';
---

<div id="light-bg" class="pointer-events-none fixed inset-0 z-0 hidden bg-neutral-50">
<div class="bg-grid absolute inset-0 opacity-60"></div>
<div
Expand All @@ -20,4 +16,4 @@ import backgroundScriptUrl from '../scripts/background.ts?url';

<div id="dark-bg" class="fixed inset-0 z-0 hidden overflow-hidden bg-black" aria-hidden="true"></div>

<script type="module" is:inline src={backgroundScriptUrl}></script>
<script src="../scripts/background.ts"></script>
3 changes: 1 addition & 2 deletions apps/website/src/components/navbar.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
import { createTranslator, getPagePath, locales, type Locale, type PageId } from '../i18n/translations';
import ThemeSwitcher from './theme-switcher.astro';
import navbarScriptUrl from '../scripts/navbar.ts?url';

type Props = {
locale: Locale;
Expand Down Expand Up @@ -97,5 +96,5 @@ const navItems = [
</div>
</div>

<script type="module" is:inline src={navbarScriptUrl}></script>
<script src="../scripts/navbar.ts"></script>
</nav>
6 changes: 1 addition & 5 deletions apps/website/src/components/page-navigation-loader.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
---
import pageNavigationLoaderScriptUrl from '../scripts/page-navigation-loader.ts?url';
---

<div id="page-navigation-loader" class="page-navigation-loader-overlay fixed inset-0 z-[60] hidden h-screen w-screen">
<div class="page-loader-indicator fixed top-0 z-[70] h-1 w-1/4 rounded bg-black dark:bg-white"></div>
</div>

<script type="module" is:inline src={pageNavigationLoaderScriptUrl}></script>
<script src="../scripts/page-navigation-loader.ts"></script>
3 changes: 1 addition & 2 deletions apps/website/src/components/projects-page.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
import { createTranslator, type Locale } from '../i18n/translations';
import projectsScriptUrl from '../scripts/projects.ts?url';

type Props = {
locale: Locale;
Expand Down Expand Up @@ -198,4 +197,4 @@ const t = createTranslator(locale);
</div>
</main>

<script type="module" is:inline src={projectsScriptUrl}></script>
<script src="../scripts/projects.ts"></script>
6 changes: 1 addition & 5 deletions apps/website/src/components/theme-switcher.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
import themeSwitcherScriptUrl from '../scripts/theme-switcher.ts?url';
---

<label
tabindex="0"
class="theme-switch-label relative flex h-10 w-10 cursor-pointer items-center justify-center overflow-hidden rounded-md transition-colors outline-none hover:bg-neutral-200 focus-visible:ring-2 focus-visible:ring-black dark:hover:bg-neutral-800 dark:focus-visible:ring-white"
Expand Down Expand Up @@ -41,4 +37,4 @@ import themeSwitcherScriptUrl from '../scripts/theme-switcher.ts?url';
</svg>
</label>

<script type="module" is:inline src={themeSwitcherScriptUrl}></script>
<script src="../scripts/theme-switcher.ts"></script>
Loading