Closed dclong closed 4 years ago
You still have to add the plugin name in the configuration file in the plugins
variable. Did you do that?
I added the plugin name as below but it says the plugin cannot be loaded.
PLUGINS = ["render_math"]
Do I need to keep a plugins directory and specify a path to the plugins directory?
Do I need to keep a plugins directory and specify a path to the plugins directory?
No.
What you have should work. So maybe there is a bug.
I notice that if I have plugins directory and have the old render-math repo cloned into it, and specify "render-math" in PLUGINS, things work.
@dclong: What version of Pelican are you using? If you are on the Pelican 4.2 release version, that could explain the problem. Pip-installing plugins is only supported on the to-be-released next version of Pelican, so you would need to install the current Pelican master
branch in order for the install instructions as written to function as expected.
@justinmayer, Thank you very much! Installing from the current Pelican master branch resolves the issue. You guys are awesome!
If this plugin is already released on PyPi, then it should have an install_requires
version specifier in the setup.py to prevent installs in unsupported Pelican versions. That would solve the issue of users pip installing the plugin and finding it doesn't work. It does look like it has been released prematurely: https://pypi.org/project/pelican-render-math/
This is the relevant line in the source tarball on PyPi:
install_requires = \
['pelican>=4.2,<5.0', 'typogrify>=2.0.7,<3.0.0']
which sounds like it is incorrect if Pelican 4.2 is not supported.
Well, for the moment, it is as correct as it can be. I intended for the release window to be much shorter, such that the above value would be quickly changed to match the new Pelican release version number, but that unfortunately did not happen as soon as I expected. We are, however, getting close to release, so I suspect the most sensible course of action is to wait a bit longer and adjust this value post-release.
This issue should be rectified as of Pelican 4.5 and Render Math 1.0.1+.
I install the Python module but the math equations are not rendered.