-
Notifications
You must be signed in to change notification settings - Fork 2
Make navigation URL generation base-path-aware across GitHub Pages and EMU hosting #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
saracarl
merged 14 commits into
develop
from
copilot/implement-base-path-aware-url-generation
Jul 17, 2026
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6eeca50
Initial plan
Copilot 471fd6d
fix: use Astro base URL for home and nav links
Copilot 67e92a5
chore: make root base-path handling explicit in sidebar
Copilot 4008185
fix: normalize base path in nav link builders
Copilot 0935a33
refactor: share base path normalization utility
Copilot 5344b7c
chore: simplify sidebar href normalization flow
Copilot b7690f1
fix: standardize trailing slash on home links
Copilot 7a697c3
fix: normalize base path to absolute root-prefixed format
Copilot 31f43fa
chore: preserve single trailing-slash normalization behavior
Copilot 44046b0
fix: use dynamic Astro base for sidebar links
Copilot 3a5ca24
fix: restore header base and normalize tag route URLs
Copilot 502321c
refactor: normalize joinBasePath home-path behavior
Copilot 465ddc9
feat: use include_slug_in_base for URL generation
Copilot a74b553
Add build-time config logging to astro.config.mjs
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,29 @@ | ||
| import { defineConfig } from 'astro/config'; | ||
| import { dynamicConfig } from './dynamic-astro-config.js'; | ||
| import { createRequire } from 'module'; | ||
|
|
||
| // We are utilizing a dynamic astro config in this | ||
| // template. When the template is used to create | ||
| // a new project by the AVAnnotate admin application | ||
| // the dynamic configuration will be updated to reflect | ||
| // the new project | ||
|
|
||
| // --- Build-time config logging --- | ||
| const require = createRequire(import.meta.url); | ||
| const project = require('./src/content/project/project.json'); | ||
|
|
||
| console.log('[AVAnnotate build] project.json raw values:'); | ||
| console.log(' project.slug :', project.project.slug); | ||
| console.log(' project.github_org :', project.project.github_org); | ||
| console.log(' project.media_player :', project.project.media_player); | ||
| console.log(' publish.include_slug_in_base:', project.publish.include_slug_in_base); | ||
| console.log(' publish.publish_pages_app :', project.publish.publish_pages_app); | ||
|
|
||
| console.log('[AVAnnotate build] resolved Astro config values:'); | ||
| console.log(' site :', dynamicConfig.site); | ||
| console.log(' base :', dynamicConfig.base); | ||
| console.log(' srcDir:', dynamicConfig.srcDir); | ||
| // --------------------------------- | ||
|
|
||
| // https://astro.build/config | ||
| export default defineConfig(dynamicConfig); // Do not change! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this line removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot See comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed that import because the header no longer uses
dynamicConfigfor URL building. It now usesimport.meta.env.BASE_URL(vianormalizeBasePath) so links follow Astro’s configured base path in both classic GitHub Pages and EMU hosting.