atelier.sphinxconf.sigal_image

(This module’s source code is available here.)

Defines the sigal_image directive.

.. sigal_image::

Example:

.. sigal_image:: 2014/04/10/img_6617.jpg

will insert the following rst code:

.. raw:: html

  <a href="http://sigal.saffre-rumma.net/2014/04/10/img_6617.jpg">
  <img 
  src="http://sigal.saffre-rumma.net/2014/04/10/thumbnails/img_6617.jpg"/>
</a>

Supposing that sigal_base_url in your conf.py is set to "http://sigal.saffre-rumma.net".

This creates a bridge between my photo collection and my blog. I manage my personal photo collection with Shotwell. All photos are in a single central file tree, organized into years, months and days as Shotwell does automatically.

From within Shotwell I use a tag “blog” to mark all photos that are to be published. Then I use the shotwell2blog script to extract those images to a separate tree. This tree serves as input for Sigal which will generate a static html gallery. My pricate Sigal gallery is here.

The sigal_image directive was the last missing part of this publishing bridge: it allows me to integrate these pictures into blog entries.

New since 20140729: Requires lightbox. And then write a layout.html template as follows:

{%- block extrahead %}
  {{ super() }}
<script src="{{ pathto('')}}data/lightbox/js/jquery-1.11.0.min.js"></script>
<script src="{{ pathto('')}}data/lightbox/js/lightbox.min.js"></script>
<link href="{{ pathto('')}}data/lightbox/css/lightbox.css" rel="stylesheet" />
{% endblock %}

Functions

setup(app)

Classes

InsertInputDirective(name, arguments, ...) Base class for directives that work by generating rst markup to be forwarded to state_machine.insert_input().
SigalImage(name, arguments, options, ...)