+OK
  • Home
  • About
  • Categories
  • Tags
  • Archives

Introduction to Pelican (2) Theme 'Elegant' Settings

[TOC]

Disqus

Comments feature can be added by Disqus. If you do not have it, just register an account and set by steps. Add the following command in pelicanconf.py:

$ DISQUS_SITENAME = 'shortname'

At first I tried several times but the function did not work. The reason is that I ignored the SITEURL. To enable the comments feature, even you do not have a domain, you need to add the github page url:

$ ITEURL = 'http://username.github.io'

Theme

If you want to use themes other than the default one, you need to download the themes you want first. There is one way:

$ cd blog
$ git clone https://github.com/getpelican/pelican-themes.git
$ cd pelican-themes

It seems that some themes are lost when I clone them from pelican github, so it will be better to check the folders before using them. You can always download themes online and put them in the folder you want.

Then, you can choose the themes you have in the pelican-themes folder. To change the theme, you need to configure in pelicanconf.py.For example:

$ THEME = '/Users/User/Blog/pelican-themes/elegant'

Search

The theme elegent v1.3 should have included the following search engin plugin.

Tipue Search, an open source site search engine jQuery plugin available under the MIT License, is used in my theme.

BeautifulSoup is required to use this plugin:

$ sudo pip install beautifulsoup4

The latest Tipue Search is version 5.0. If you meet any problem with the search, please replace the default version with the newest version in Tipue Search. The format may change because of the replacement, so you may need to modify the tipuesearch.css file or just use the default version. By the test, I found the main problem the all the results are undefined may be caused by default tipuesearch_set.js file in this theme.

Plugins

Easiest way to install and use these plugins is cloning this repo:

$ git clone --recursive https://github.com/getpelican/pelican-plugins

and activating the ones you want in your settings file:

$ PLUGIN_PATHS = ['/Users/User/Blog/pelican-plugins']
$ PLUGINS = ['tipue_search']

The detail of plugins can be read from on GitHub.

Pages

If you create a folder named pages, all the files in this folder will be static pages. All the pages can be added to the menu By setting DISPLAY_PAGES_ON_MENU in pelicanconf.py.

Share on: Twitter ❄ Facebook ❄ Google+ ❄ Email

So what do you think of it? Do I miss something? Leave your comments below...

Comments
comments powered by Disqus

Related Posts

  • Introduction to Pelican (1) Creating a Personal Web Page
  • Vim Tutorial (3) Theme and Font

  • « Introduction to Pelican (1) Creating a Personal Web Page
  • 烟霾 »

Published

Sep 14, 2015

Last Updated

Sep 21, 2015

Category

Coding

Tags

  • disqus 1
  • elegant 1
  • github 2
  • pelican 2
  • search 1
  • theme 2

Contact

  • Creative Commons License
    "+OK" by Joe is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
  • Powered by Pelican. Theme: Elegant by Talha Mansoor