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

Support sites with url_path_prefix in the development server #51

Open
Arnau478 opened this issue Sep 7, 2024 · 0 comments
Open

Support sites with url_path_prefix in the development server #51

Arnau478 opened this issue Sep 7, 2024 · 0 comments

Comments

@Arnau478
Copy link
Contributor

Arnau478 commented Sep 7, 2024

The way the development server is invoked, it has no way to know what the url_path_prefix is. It's mostly fine, but it causes incorrect behavior in the following scenario.

Have a site with a url_path_prefix with the value prefix. Create an index page, that does a $link.page('foo'). It can be accessed at localhost:<port>/ (not localhost:<port>/prefix/). When zine built the page, $link.page('foo') resolved to /prefix/foo (which makes sense). But now, there's a link that points to localhost:<port>/prefix/foo, which is not where the development server is serving the page.

I think this should be solved by simply passing the url_path_prefix as an argument to the development server and serving it with that prefix. The only problem that would introduce is that now nothing is served at localhost:<port>. Maybe it could return a 301 moved permanently to redirect to localhost:<port>/prefix, for convenience?

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

No branches or pull requests

1 participant