We have already discussed about Pelican Themes and Plugins in this blog.

We have also seen the comparison between the various popular themes. Elegant is our choice of Themes because of search functionality which it provides along with the minimalist concepts.

We will first focus on how we can integrate one particular themes and also one particular plugins which will give us a fair amount of idea on how to integrate different plugins.

Integrating the Elegant Theme

We have already created folder named plugins and themes, which are clone of the Pelican Plugins and Themes repository. If we see the directory listing inside themes folder we fill find different folders with distinguished names, these are the themes name.

To use any of the themes in this folder we have to add this pelican settings in the pelicanconf.py.

THEME = 'themes/elegant'

Follow the commands to generate the site and launch the site, and you have your new themes applied.

pelican content
cd output/
python -m pelican.server

Integrating A Plugin into Pelican

The process to integrate any plugin is also similar to integrating Themes. If we see inside the plugins directory which we had cloned, we will find a lot of different folder name just like in themes directory. Each of these name is a plugin name.

To integrate a plugin into Pelican we have to add these 2 configuration into the pelicanconf.py file.

PLUGIN_PATHS = ['plugin']   # Name of the directory where plugin are kept.
PLUGINS = ['sitemap']       # Name of the particular plugin inside the directory.

In the above code sample, we can see we have integrated the sitemap plugin, and as per the documentation, this generates a Sitemap which we generally submit it to some Webmaster tools.

Likewise, if we want to integrate any other plugins, we have just add it to the list variable PLUGINS along with the settings required for that plugins defined in its documentation.

References

Spread the word.... TwitterFacebookEmail


Related Posts


Published

Last Updated

Category

Pelican

Tags

Stay in Touch

Email Newsletter