Skip to content

Fix Documentation Styles on Subpath Deployment#32

Merged
amrabed merged 1 commit into
mainfrom
fix/docs-styles-subpath-15904934647840445646
Jun 18, 2026
Merged

Fix Documentation Styles on Subpath Deployment#32
amrabed merged 1 commit into
mainfrom
fix/docs-styles-subpath-15904934647840445646

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

The documentation site at cur8d.dev/typescript was failing to load styles due to incorrect asset pathing (root-relative vs. subpath-relative) and restrictive CSP headers from the root application.

This PR implements two fixes:

  1. Configures basePath and assetPrefix in the documentation's Next.js config to correctly reference assets under the /typescript subpath in production.
  2. Isolates the documentation site from root CSP headers and provides a dedicated, permissive CSP meta tag within the documentation's layout, ensuring it works with static exports and external dependencies like Google Fonts.

PR created automatically by Jules for task 15904934647840445646 started by @amrabed

- Updated `docs/next.config.mjs` to include `basePath` and `assetPrefix` for production builds to ensure correct asset loading on GitHub Pages under the `/typescript` subpath.
- Modified root `next.config.ts` to exclude the `/typescript/` subpath from global security headers using a negative lookahead regex.
- Added a permissive CSP meta tag to the documentation layout to allow Google Fonts and inline styles required by Nextra.
@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@amrabed amrabed marked this pull request as ready for review June 18, 2026 04:19
@amrabed amrabed self-requested a review as a code owner June 18, 2026 04:19
@amrabed amrabed merged commit 071be66 into main Jun 18, 2026
3 checks passed
@amrabed amrabed deleted the fix/docs-styles-subpath-15904934647840445646 branch June 18, 2026 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant