Lepagito

A lovely pelican theme

Getting started

Lepagito is a lovely pelican theme.

Observe it first in action on the lepagito web site. Also, it is used by both the Pirogh author's blog, the Greuze-Cottave blog for painters and designers and the galleria pelican plugin documentation.

You're interested? Fascinated? Let's start! First, download and install the theme:

git clone https://gricad-gitlab.univ-grenoble-alpes.fr/internet/lepagito

For navigation and searches, this theme includes the optional neighbors, search and sitemap pelican plugins:

sudo apt install pelican python3-pip python3.11-venv python3-full python-is-python3
python -m venv ~/mypy
source ~/mypy/bin/activate
pip install pelican-neighbors
pip install pelican-search
pip install pelican-sitemap
pip …
Read more:

The logo

The logo at the top of each page is sill the heat, which is specific to the Lepagito theme. Your blog should have its own logo, since the Lepagito logo is copyrighted (see License). To do that, copy first logos from Lepagito to your environment, exactly as:

mkdir content/theme
cp -a ~/pelican-themes/lepagito/static/img theme

In the content/theme/img directory, the files are:

logo.png
favicon-16x16.png
favicon-32x32.png
favicon.ico
apple-touch-icon.png
mstile-150x150.png
site.webmanifest

entry_foooter.png
browserconfig.xml

The first six files are different implementations of the same logo and should be modified. The …

Read more:

The file pelicanconf.py

Here is a complete example of the pelicanconf.py file, as used for the present documentation of the theme. It starts by setting some standard pelican variables, as usual. Then, come the theme's and the optional plugins.

# =============================
# 1. standard pelican variables
# =============================
SITEURL      = 'http://lepagito.artliba.org'
SITENAME     = 'Lepagito'
AUTHOR       = 'I. Lepage and P. Hesse'
SITESUBTITLE = 'A lovely pelican theme'
TIMEZONE     = 'Europe/Paris'
DEFAULT_LANG = 'en'
LOCALE       = 'C'

PATH         = 'content'
STATIC_PATHS = []

OUTPUT_PATH  = 'output'
#DELETE_OUTPUT_DIRECTORY = True # before site generation

DISPLAY_CATEGORIES_ON_MENU = False # choose a custom top menu here
MENUITEMS = (
  ('All',        'index.html'),
  ('Quickstart', 'quickstart.html'),
  ('Goodies',    'goodies.html'),
  ('Options',    'options.html'),
  ('#Tags',      'tags.html' …
Read more:

Groups of tags

In many cases, the tag list becomes very long and contains heterogeneous tags. It should be better to group them: this feature is implemented in the Lepagito theme. For instance, in the pelicanconf.py file:

TAGS_BY_GROUPS = (
  ('Color',  ('blue', 'red', 'yellow')),
  ('State',  ('solid', 'liquid', 'gas')),
  ('Firtname', ('Isabelle', 'Pierre', 'Paul', 'Jacques')),)

If a tag appears in an article but has any defined group, it will appear in the 'Others' group.

Archives and calendar

The Archives, available at the footer menu, starts with a calendar, that provides a concise view. Years and months are both links to periodic archives. In the pelicanconf.py file, the two following variables should be defined, for instance as:

YEAR_ARCHIVE_SAVE_AS  = 'archive_{date:%Y}.html'
MONTH_ARCHIVE_SAVE_AS = 'archive_{date:%Y}_{date:%m}.html'

The calendar view do not refer to any pelican plugin: this is an original functionality of the Lepagito theme. If you don't want the calendar to appear on the archives page, you could either not define at least one of these variable, or set:

ARCHIVES_CALENDAR = False

By …

Read more:

Footer menus

This theme provides an optional horizontal menu located at the bottom if each page: the footer menu. It could be useful for contact and license entries:

FOOTERMENUITEMS = (
  ('About',    'about.html'),
  ('Contact',  'contact.html'),
  ('Links',    'links.html'),
  ('License',  'license.html'),
)

A second bottom horizontal menu presents the Archives and feeds. This menu is active by default and could be removed with:

FOOTERMENUFEED = False

Finally, a third bottom horizontal menu could optionally defined by the SOCIAL standard variable of the pelican environment. This variable is not used in the pelicanconf.py file of the present documentation. As for the MENUITEMS and FOOTERMENUITEMS …

Read more: