@@ -538,7 +538,7 @@ to your configuration::
538
538
539
539
That template needs to either be part of the theme, or be placed in a ``templates/``
540
540
folder inside your site.
541
-
541
+
542
542
enclosure
543
543
Add an enclosure to this post when it's used in RSS. See `more information about enclosures <http://en.wikipedia.org/wiki/RSS_enclosure>`__
544
544
@@ -1240,14 +1240,16 @@ Annotations require JQuery and are therefore not supported in the base theme.
1240
1240
You can check bootstrap theme's ``base.html`` for details on how to handle them in
1241
1241
custom themes.
1242
1242
1243
- Image Galleries
1244
- ---------------
1243
+ Images and Galleries
1244
+ --------------------
1245
1245
1246
1246
To create an image gallery, all you have to do is add a folder inside ``galleries``,
1247
1247
and put images there. Nikola will take care of creating thumbnails, index page, etc.
1248
1248
1249
- If you click on images on a gallery, you should see a bigger image, thanks to
1250
- the excellent `colorbox <http://www.jacklmoore.com/colorbox>`_
1249
+ If you click on images on a gallery, or on images with links in post, you will
1250
+ see a bigger image, thanks to the excellent `colorbox
1251
+ <http://www.jacklmoore.com/colorbox>`_. If don’t want this behavior, add an
1252
+ ``.islink`` class to your image or link.
1251
1253
1252
1254
The gallery pages are generated using the ``gallery.tmpl`` template, and you can
1253
1255
customize it there (you could switch to another lightbox instead of colorbox, change
@@ -1267,20 +1269,24 @@ The ``conf.py`` options affecting images and gallery pages are these::
1267
1269
# "OUTPUT_PATH/relative_destination/gallery_name"
1268
1270
# Default is:
1269
1271
GALLERY_FOLDERS = {"galleries": "galleries"}
1270
- # One or more folders containing images. The format is again a dictionary of
1271
- # {"source": "relative_destination"}. Images will be scaled down if necessary so
1272
- # that neither width nor height is greater than MAX_IMAGE_SIZE and copied to
1273
- # destination folder. A thumbnail will also be created in the same folder with
1274
- # ``.thumbnail`` inserted in the file name before the file extension
1275
- # (e.g. ``tesla.thumbnail.jpg``).
1276
- IMAGE_FOLDERS = {'images': 'images'}
1277
- # More image/gallery options:
1272
+ # More gallery options:
1278
1273
THUMBNAIL_SIZE = 180
1279
- IMAGE_THUMBNAIL_SIZE = 400
1280
1274
MAX_IMAGE_SIZE = 1280
1281
1275
USE_FILENAME_AS_TITLE = True
1282
1276
EXTRA_IMAGE_EXTENSIONS = []
1283
1277
1278
+ # If set to False, it will sort by filename instead. Defaults to True
1279
+ GALLERY_SORT_BY_DATE = True
1280
+
1281
+ # Folders containing images to be used in normal posts or pages. Images will be
1282
+ # scaled down according to IMAGE_THUMBNAIL_SIZE and MAX_IMAGE_SIZE options, but
1283
+ # will have to be referenced manually to be visible on the site
1284
+ # (the thumbnail has ``.thumbnail`` added before the file extension).
1285
+ # The format is a dictionary of {source: relative destination}.
1286
+
1287
+ IMAGE_FOLDERS = {'images': 'images'}
1288
+ IMAGE_THUMBNAIL_SIZE = 400
1289
+
1284
1290
If you add a file in ``galleries/gallery_name/index.txt`` its contents will be
1285
1291
converted to HTML and inserted above the images in the gallery page. The
1286
1292
format is the same as for posts.
@@ -1647,7 +1653,7 @@ and it will produce:
1647
1653
Post List
1648
1654
~~~~~~~~~
1649
1655
1650
- .. WARNING::
1656
+ .. WARNING::
1651
1657
1652
1658
Any post or page that uses this directive will **never** be considered up-to-date,
1653
1659
meaning that every time you build the site, that post/page and everything that
0 commit comments