Pelican introduced support for LiveReload in Version 4.1.0.

To use it, you need to install LiveReload pip package.

pip install livereload

Then run from the root of the documentation,

invoke livereload

You need to install invoke and tasks.py for this feature. It does not work with Makefile.

pip install invoke

Known Issue

Pretty URLs Do Not Work

Remove or comment out ARTICLE_URL = "{slug}" from Pelican configuration to make LiveReload work

Unfortunately, Pelican LiveReload depends on Python-LiveReload, which does not support extension less files.

What does it mean?

Your URL must end at .html, like,

http://127.0.0.1:9000/live-reload-elegant-documentation.html

If it does not have the .html in the end, then LiveReload will return 404 error.

This can happen if your Pelican configuration has

ARTICLE_URL = "{slug}"

Therefore, to make LiveReload work, comment out the above line.

This issues has been reported to the Pelican team. You can track it here.

Понравилась статья? Расскажите о ней на: TwitterFacebookEmail


Talha Mansoor is the creator and lead developer of Elegant theme

Дата

Категория

Contributing

Будьте с нами