Skip to content
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

add support for configuring a base path #1116

Closed
3 tasks
Tracked by #1120
thescientist13 opened this issue May 20, 2023 · 0 comments · Fixed by #1135 or #1180
Closed
3 tasks
Tracked by #1120

add support for configuring a base path #1116

thescientist13 opened this issue May 20, 2023 · 0 comments · Fixed by #1135 or #1180
Assignees
Labels
alpha.6 breaking CLI Content as Data documentation Greenwood specific docs feature New feature or request Plugins Greenwood Plugins v0.29.0
Milestone

Comments

@thescientist13
Copy link
Member

Type of Change

Feature

Summary

It is not uncommon for websites to be deployed at an "offset" URL from the root domain. For instance www.example.com/xyz. Most notably, GitHub Pages does this for project based site, as the full URL is a concatenation of the github.com domain and a path segment based on the repository name, and so <repository> is effectively the web root in this case.

http://<username>.github.io/<repository>

Note: by virtue of this feature request, it does require acknowledging that your current guide on using GitHub Pages is both out of date, and thus broken. Updating that guide should come immediately after introducing this feature.

Thus, it would require all assets to be relative that path segment, e.g.

  • /<repository>/header.js
  • /<repository>/assers/logo.png
  • etc

Details

This should be doable but would require a few different parts of the system working together

  1. servers (local and prod) would need to account for this public path when resolving file paths to the filesystem
  2. Will need to handle updating <link>, <script>, etc tags accordingly when bundling
  3. Others I'm sure 😅

I wonder if this is something that setting a <base href="..."> tag could help with?

@thescientist13 thescientist13 added CLI feature New feature or request v0.29.0 labels May 20, 2023
@thescientist13 thescientist13 added this to the 1.0 milestone May 20, 2023
@thescientist13 thescientist13 self-assigned this Jun 3, 2023
@thescientist13 thescientist13 changed the title add support for configuring a public path add support for configuring a base path Jun 3, 2023
@thescientist13 thescientist13 mentioned this issue Jun 29, 2023
25 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment