danielfrg / pelican-jupyter

Pelican plugin for blogging with Jupyter/IPython Notebooks
Apache License 2.0
422 stars 105 forks source link

Can't pass variables in pelicanconf.py #108

Open aegis4048 opened 5 years ago

aegis4048 commented 5 years ago

Inside Jupyter notebook, I want to embed image files. The tree for image files are like this:

my_blog > content > images > mobile_1.jpg my_blog > content > images > mobile_2.jpg

I want to refer to my static image files using {{ SITEURL }} argument. But when I use {{ SITEURL }}, or any other pelicanconf.py variables inside Jupyter like this,

<div class="row">
    <div class="col-4"><img src="{{ SITEURL }}/images/mobile_1.jpg"></div>
    <div class="col-4"><img src="{{ SITEURL }}/images/mobile_2.jpg"></div>
</div>

and run pelican content, get the following warning message

WARNING: Replacement Indicator '{ SITEURL ' not recognized, skipping replacement

And the SITEURL was indeed not passed into the HTML file rendered using Jupyter. Is there anyway that I can pass variables pelicanconf.py into Jupyter?