Enhance basePath configuration with <base href="..."> support
#1175
thescientist13
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Overview
Coming out of #1116 / #1135 , one of the limitations I ran into was with "user" content, e.g.
<a>,<img>, tags etc. For now, users will have to prefix this themselves in their own application code, e.g,I had hoped to leverage the
<base>tag for this, so that Greenwood could automatically set this tagand then users would be able to do this
Thoughts
Unfortunately, I could not get it work, hence the opening of this discussion and short of creating our own
<Link>and<Image>tags like say Next, I had hoped to leverage the<base>tag for this and effectively having to do it with JavaScript.I tried a few different approaches but could not get them to work. For instance doing this
Would work if the user is already at
/my-path, but starts to break down the further you go, since nested links would assume the last segment. For example, if you are on/my-path/about/and wanted to go/my-path/blog(like in the header)You'll end up on
/my-path/about/blog🤷♂️Not sure if I totally messed up the implementation / understanding of how it works, so hoping maybe someone else can lend some thoughts here and possibly a solution! 🙏 🤞
All reactions