-
-
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
drafts index page renders with incorrect links to draft articles if it doesnt have a trailing / #2841
Comments
I'd check the relevant templates. Make sure they are in this form: note the explicit |
I'm not using any templates for the drafts index view. |
Oh, you mean the default directory listing (the one you get without an index). Yes, I can replicate that. Trying with |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your participation and understanding. |
I think that the fix for this is to have the embedded HTTP server enabled by |
So the issue is:
One solution is to redirect browser to We can let Alternatively, we roll out our own redirect with Another solution is that we just make our own directory listing with absolute URLs. |
I think that doing a redirect is good enough. No need for custom directory listing. Either using the default |
I have read the Filing Issues and subsequent “How to Get Help” sections of the documentation.
I have searched the issues (including closed ones) and believe that this is not a duplicate.
OS version and name: MacOS 11.0.1
Python version: 3.8.5
Pelican version: 4.5.3
Link to theme: my own theme
Links to plugins:
nb_markup,
'neighbors',
'pelican.plugins.render_math',
'pelican.plugins.sitemap',
'pelican.plugins.simple_footnotes',
'pelican.plugins.more_categories',
Link to your site: johnmathews.eu
**Link to Gist of local settings file
Issue
in my local settings file I have the following settings for viewing drafts (i believe this is the default)
I launch a local server with:
pelican --listen --autoreload
if I go to
localhost:8000/drafts
then I see the correct (complete) list of hyperlinks to each draft article, but the link urls are wrong. they arelocalhost:8000/<article-slug>.html
but they should belocalhost:8000/drafts/<article-slug>.html
If however, i goto
localhost:8000/drafts/
(note the trailing/
) then the links are correct and clicking on them sends the browser to the article.Notwithstanding the incorrect links, the drafts index page seems to be identical in both cases.
This seems like a bug to me, but perhaps I've done something weird that I haven't spotted?
The text was updated successfully, but these errors were encountered: