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

Live reload does not work ARTICLE_URL does not end at ".html" #2595

Closed
talha131 opened this issue Jul 19, 2019 · 3 comments
Closed

Live reload does not work ARTICLE_URL does not end at ".html" #2595

talha131 opened this issue Jul 19, 2019 · 3 comments

Comments

@talha131
Copy link
Contributor

  1. Create a default blog using pelican-quickstart
  2. Add a test .md file
  3. In your pelicanconf.py set this option
    ARTICLE_URL = "{slug}"
  4. Run invoke livereload

All links to articles will NOT end with a .html. For example,

http://localhost:8000/contributing-new-features

But clicking on them gives error.

404: Not Found

live-reload server logs show

[I 190719 22:27:29 handlers:135] Browser Connected: http://localhost:8000/
[W 190719 22:27:35 log:200] 404 GET /contributing-new-features (127.0.0.1) 0.62ms
[W 190719 22:28:32 log:200] 404 GET /contributing-new-features (127.0.0.1) 0.58ms

This issue is because, live-reload does not support extension less files. There is a PR for it in 2016 but it has not been accepted.

lepture/python-livereload#131

@avaris
Copy link
Member

avaris commented Jul 19, 2019

OK... What would you suggest pelican do for this?

@justinmayer
Copy link
Member

justinmayer commented Jul 19, 2019 via email

@talha131
Copy link
Contributor Author

@avaris @justinmayer totally agree with you guys. My intention behind this issue was not to make Pelican team fix a bug or lack of feature in an external project, but to save times of other users who may stumble on this bug.


Anyone else coming to this issue from Google.

Easiest Workaround

Remove this setting from your configuration or move it to publish configuration

ARTICLE_URL = "{slug}"

This should work for most users. You local links will end at .html but the production version will have pretty URLs.

Use Alternative Tools

I opted to use gulp.js and BrowserSync.

You can read about why here.

And on how to setup, see these links:

  1. Prerequisites
  2. gulp configuration
  3. package.json

Related to Pelican-Elegant/elegant#285

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

3 participants