-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Pelican --listen
directory fix
#2930
Conversation
P.S. If this could be marked "hacktoberfest-accepted" (so it counts towards my Hacktoberfest Pull Requests), that would be appreciated! |
I need a lot more context to understand the issue. Given that, I cannot replicate the issue you are describing. |
I'm using the test site that is part of my nojekyll plugin, from here --> https://github.com/pelican-plugins/nojekyll/tree/master/test-site There's nothing crazy with this site; it's trying to be a very simple but complete site. I don't have a requirement file, so you'll have to install those manually: clone the nojekyll repo (to get the test site), create a virtual environment, and install the requirements:
Next, generate the site. From the site root (the
You should get output like this: Then start the pelican server (we haven't changed directories or anything):
You can pull up the generated site in your web browser at http://localhost:8000/ With the existing server (i.e. 4.7.0), the front page of the site will load, but the CSS won't and any other page (like the authors page or the category page) will return a 404 Error. With this code active, the front page loads, and the CSS shows HTTP code 200 (or 304) and all the other pages will load (actually, Firefox asks if you want to save the secondary pages to disk, but this is the Mimetype issue solved in #2928; this Mimetype issue is the same reason the front page isn't styled). If there's a simplier or easier or better way, by all means let me know. |
Again, I cannot replicate. Everything works perfectly fine here. I tested this on Vivaldi (4.2.2406.54), Chrome (94.0.4606.71) and Firefox (50.0.2). Below is after: cloning your repo, creating a venv,
|
@avaris : This seems to have been fixed (if this ever was more than my local issues...), likely by #2931. I'm still not sure how the server get redirected to the output directory, but that's fine. In any case, I'm excited to learn about the built-in server and look forward to use it going forward. I'm going to close this, as this PR doesn't seem to anything that hasn't been fixed better elsewhere. :) |
When trying to fix some issues with
pelican --listen
, I couldn't get it to work. It turns out it was trying to serve from the project root directly, rather than the output directory.It now serves the output directory, although it still needs to be invoked from the project's root (i.e. the folder that holds your
pelicanconf.py
file).Pull Request Checklist