I have installed Pelican on an Ubuntu server running in VirtualBox and it is working just fine! But when I tried a math equation it did not render it at all.
I checked the Pelican version:
$ pelican --version
4.9.1
Directory structure:
webroot/
pelicanconf.py
content/
output/
... etc ...
plugins/
... plugins go here ...
pelicanconf.py:
PLUGIN_PATHS = ['plugins']
PLUGINS = ['render_math']
There doesn't seem to be any additional math related settings in pelicanconf.
Installed plugins:
git clone https://github.com/getpelican/pelican-plugins plugins
$ git log
commit 10a14332c35932b282b1ec63f0e10ae7d45aed8c (HEAD -> master, origin/master, origin/HEAD)
Merge: 50da7ed 252eb86
Author: Justin Mayer <[email protected]>
Date: Fri Nov 10 18:46:05 2023 +0100
Note: no warnings or errors in syslog when I start the service running Pelican.
The theme I'm using is "pelican-twitchy" with a few minor CSS changes I made. It does not seem to have any additional config for implementing mathjax.
Based on various websites, I tried these in my markdown file:
$x^2$
$x + y$
$$ s(t) = \int_{-\infty}^{+\infty} {F(f) e^{j 2 \pi f t} } dt $$
\begin{equation} x^2 \end{equation}
They render as plain strings, no mathjax at all.
But then I noticed the Readme.md in render_math says:
**NOTE: This plugin has been moved to its own repository. Please file any issues/PRs there. Once all plugins have been migrated to the New Pelican Plugins organization, this monolithic repository will be archived.
Since I am running Pelican 4.9.1 I tried:
rm -rf plugins
mkdir -p plugins
git clone https://github.com/pelican-plugins/render-math.git plugins/render-math
Updated pelicanconf.py:
PLUGIN_PATHS = ['plugins']
PLUGINS = ['render-math']
And when I restarted Pelican via the service:
ERROR Cannot register plugin `render-math` log.py:94
module 'render-math' has no attribute 'register'
What should I try next?
Went to https://github.com/pelican-plugins/render-math/issues/20 and it suggested going to: https://github.com/pelican-plugins/render-math#enabling-additional-features
And that section says:
I added this line to base.html:
and these lines (double $$ delimiters) now work:
The single $ lines still don't work:
These don't work, but is expected: