Build-in `nikola serve` development server could support non-root sites better.
aknrdureegaesr opened this issue · 0 comments
aknrdureegaesr commented
Environment
Python Version:
3.9.2 (not relevant)
Nikola Version:
Git commit b01c040.
Operating System:
Debian GNU/Linux 11 (bullseye) (not relevant)
Description:
Setup:
- Configure a non-root
SITE_URL
, e.g.,SITE_URL = "https://example.org/blog/"
. - Configure
URL_TYPE = 'full_path'
. - Have some content and build the site.
- Start
nikola serve --browser
Expected:
- CSS and other supported files are loaded by the browser in the same way as they will be loaded after deployment to the production server.
- It is possible to navigate links.
Actually seen:
- As there is no CSS and other support stuff, the HTML looks raw and ugly in the browser.
- Clicking links does not work.
Analysis:
- The browser is sent to
http://127.0.0.1:8000/
instead ofhttp://127.0.0.1:8000/blog/
. - The browser tries to load the support files from
http://127.0.0.1:8000/blog/...
, but the server tries to serve them fromhttp://127.0.0.1:8000/
.
Remark:
This bug report is for nikola serve
what #3715 is for nikola auto
.