Closed McSneaky closed 1 year ago
That fix works for me, but I think it would break for people who use theme under some sub-path, like mysite.com/blog/? 🤔
@McSneaky, yeah that's why theme developers are required to use absolute links.
Or maybe should introduce some new config variable?
Interesting idea, I can look into it when I get some time.
Not possible because of this requirement
but I think it would break for people who use theme under some sub-path, like mysite.com/blog/
Such people will be ok if their baaseURL to https://mysite.com/blog/
Hello!
I've been using your theme on https://adonisjs-news.com/ and I really like it, real good job :+1:
Since I'm doing a lot of deployments to some random URLs to test stuff I've been running into issues, that I can't set
baseURL
in configuration correctly (coz URL changes with every commit I do - one example URL: https://f20eb25b.adonisjs-news.pages.dev/)Now the issue is, that when I new domain is generated it still tries to load some stuff from adonisjs-news.com not from that new domain. Since I have set
https://adonisjs-news.com/
as mybaseURL
that's why some of the resources are not loading in correctly. You can open dev tools in https://f20eb25b.adonisjs-news.pages.dev/ and see what I meanFix is to not add whole baseURL in front of resources, but just add
/
in front of there. I already did that in some template files and it works all good (just replaced.Permalink
with.RelPermalink
)For example
styles.html
:That fix works for me, but I think it would break for people who use theme under some sub-path, like
mysite.com/blog/
? :thinking:Is there some way to make it work both ways? Or maybe should introduce some new config variable? Or maybe there's already some config in there for Hugo? :thinking:
Edit: I can open PR with those
RelPermalink
changes, just not sure about sub-paths if it will break or not