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

Build-in nikola serve development server could support non-root sites better. #3726

Open
aknrdureegaesr opened this issue Jan 2, 2024 · 0 comments
Labels

Comments

@aknrdureegaesr
Copy link
Contributor

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 of http://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 from http://127.0.0.1:8000/.

Remark:

This bug report is for nikola serve what #3715 is for nikola auto.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant