-
Notifications
You must be signed in to change notification settings - Fork 986
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
livereload.js does not load when using an alternative base path #2742
Comments
|
I could probably hack that in, but it seems like a pretty small codechange to fix it in Zola itself. |
I think that's fine to do a PR to add that to the next branch |
No, because some may want to reference the functions from the main website, for example, say: web is the main website, and subweb is the subfolder in it, like GitHub pages. And then user places the functions.js in the main website ( Of course if this option would be implemented, a config option to turn this off will need to be advised alongside that one. |
The The pages do not automatically update and I have to restart the server each time I make a new change. I'm using zola 0.19.2 on Mac OS Sequoia 15.2 |
Bug Report
I am locally testing a zola project using
zola serve --base-url http://localhost/project
This is to mimic how github pages lays out a subdirectory, so I can make sure my links are robust to being on a subdirectory.
However, when serving, zola injects
<script src="/livereload.js?port=1024&mindelay=10"></script></body>
because this isn't under the base path, this script fails to load.
I think the fix is just adding the base url to the format string here: https://github.com/getzola/zola/blob/master/components/site/src/lib.rs#L576
Environment
Zola version: 0.19.2
Expected Behavior
livereload.js loads properly
Current Behavior
GET http://localhost:1111/livereload.js 404s
Step to reproduce
zola serve --base-url http://localhost/project
The text was updated successfully, but these errors were encountered: