commit
7df0275d47
20 changed files with 3803 additions and 0 deletions
@ -0,0 +1,6 @@ |
|||
env/* |
|||
_build/* |
|||
pictures/* |
|||
*.egg |
|||
*.egg-info |
|||
*.pyc |
@ -0,0 +1 @@ |
|||
|
@ -0,0 +1,85 @@ |
|||
# Copyright (c) 2009-2018 - Simon Conseil |
|||
# Copyright (c) 2014 - Jamie Starke |
|||
|
|||
# Permission is hereby granted, free of charge, to any person obtaining a copy |
|||
# of this software and associated documentation files (the "Software"), to |
|||
# deal in the Software without restriction, including without limitation the |
|||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
|||
# sell copies of the Software, and to permit persons to whom the Software is |
|||
# furnished to do so, subject to the following conditions: |
|||
|
|||
# The above copyright notice and this permission notice shall be included in |
|||
# all copies or substantial portions of the Software. |
|||
|
|||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS |
|||
# IN THE SOFTWARE. |
|||
|
|||
"""Plugin which generates HTML pages for each image. |
|||
Currently this plugin can be used only with the colorbox theme, the other |
|||
themes have to be adapted. |
|||
For themes, the ``previous_media`` and ``next_media`` variables contain the |
|||
previous/next :class:`~sigal.gallery.Media` objects. |
|||
""" |
|||
|
|||
import os |
|||
|
|||
from sigal import signals |
|||
from sigal.writer import AbstractWriter |
|||
from sigal.utils import url_from_path |
|||
from sigal.pkgmeta import __url__ as sigal_link |
|||
|
|||
|
|||
class PageWriter(AbstractWriter): |
|||
'''A writer for writing media pages, based on writer''' |
|||
|
|||
template_file = "media.html" |
|||
|
|||
def write(self, album, media_group, idx): |
|||
''' Generate the media page and save it ''' |
|||
|
|||
file_path = os.path.join(album.dst_path, media_group[0].filename) |
|||
|
|||
page = self.template.render({ |
|||
'album': album, |
|||
'media': media_group[0], |
|||
'media_index': idx, |
|||
'previous_media': media_group[-1], |
|||
'next_media': media_group[1], |
|||
'index_title': self.index_title, |
|||
'settings': self.settings, |
|||
'sigal_link': sigal_link, |
|||
'theme': {'name': os.path.basename(self.theme), |
|||
'url': url_from_path(os.path.relpath(self.theme_path, |
|||
album.dst_path))}, |
|||
}) |
|||
|
|||
output_file = "%s.html" % file_path |
|||
|
|||
with open(output_file, 'w', encoding='utf-8') as f: |
|||
f.write(page) |
|||
|
|||
|
|||
def generate_media_pages(gallery): |
|||
'''Generates and writes the media pages for all media in the gallery''' |
|||
|
|||
writer = PageWriter(gallery.settings, index_title=gallery.title) |
|||
|
|||
for album in gallery.albums.values(): |
|||
medias = album.medias |
|||
next_medias = medias[1:] + [None] |
|||
previous_medias = [None] + medias[:-1] |
|||
|
|||
# The media group allows us to easily get next and previous links |
|||
media_groups = zip(medias, next_medias, previous_medias) |
|||
|
|||
for idx, media_group in enumerate(media_groups): |
|||
writer.write(album, media_group, idx) |
|||
|
|||
|
|||
def register(settings): |
|||
signals.gallery_build.connect(generate_media_pages) |
@ -0,0 +1,9 @@ |
|||
import setuptools |
|||
|
|||
|
|||
setuptools.setup( |
|||
name="bksp-photo-plugins", |
|||
version="0.0.1", |
|||
packages=setuptools.find_packages(), |
|||
python_requires='>=3.6', |
|||
) |
@ -0,0 +1,83 @@ |
|||
@font-face { |
|||
font-family: 'amikoregular'; |
|||
src: url('../fonts/Amiko-Regular-webfont.woff') format('woff'); |
|||
font-weight: normal; |
|||
font-style: normal; |
|||
|
|||
} |
|||
|
|||
html, body { |
|||
margin: 0; |
|||
font-family: amikoregular, sans; |
|||
} |
|||
|
|||
header { |
|||
padding: 15px; |
|||
border-bottom: #262a50 solid 2px; |
|||
display: flex; |
|||
align-items: baseline; |
|||
} |
|||
|
|||
header a { |
|||
color: inherit; |
|||
text-decoration: none; |
|||
} |
|||
|
|||
header h1 { |
|||
margin: 0; |
|||
font-size: 1.25em; |
|||
} |
|||
|
|||
header h2 { |
|||
font-size: 1em; |
|||
color: #a8a8a8; |
|||
margin: 0; |
|||
margin-left: .5em; |
|||
flex: 1; |
|||
} |
|||
|
|||
|
|||
nav ul { |
|||
list-style: none; |
|||
margin: 0; |
|||
padding: 0; |
|||
} |
|||
|
|||
nav ul li { |
|||
display: inline-block; |
|||
margin: 0 .5em; |
|||
} |
|||
|
|||
main { |
|||
width: 75%; |
|||
margin: auto; |
|||
} |
|||
|
|||
main ul { |
|||
display: flex; |
|||
justify-content: space-evenly; |
|||
list-style: none; |
|||
padding: 0; |
|||
margin: 0; |
|||
flex-wrap: wrap; |
|||
} |
|||
|
|||
main ul .thumbnail { |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
margin: 1em; |
|||
width: 250px; |
|||
height: 250px; |
|||
text-align: center; |
|||
} |
|||
|
|||
main ul .thumbnail img { |
|||
max-width: 250px; |
|||
max-height: 250px; |
|||
} |
|||
|
|||
main ul .thumbnail a { |
|||
color: inherit; |
|||
text-decoration: none; |
|||
} |
@ -0,0 +1,85 @@ |
|||
html, body { |
|||
height: 100%; |
|||
} |
|||
|
|||
body { |
|||
display: flex; |
|||
flex-flow: column; |
|||
} |
|||
|
|||
main { |
|||
flex: 1 0 auto; |
|||
display: flex; |
|||
flex-flow: column; |
|||
align-items: center; |
|||
} |
|||
|
|||
main > div { |
|||
flex: 1 0 auto; |
|||
position: relative; |
|||
width: 100%; |
|||
margin: 1em auto; |
|||
} |
|||
|
|||
main > div > img { |
|||
max-width: 100%; |
|||
max-height: 100%; |
|||
position: absolute; |
|||
top: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
left: 0; |
|||
margin: auto; |
|||
} |
|||
|
|||
.overlay-nav, .media-nav a { |
|||
color: inherit; |
|||
} |
|||
|
|||
.media-nav { |
|||
margin-bottom: 1em; |
|||
} |
|||
|
|||
.media-nav a:not([href]) { |
|||
color: #a0a0a0; |
|||
} |
|||
|
|||
.overlay-nav { |
|||
position: fixed; |
|||
height: 100%; |
|||
width: 33%; |
|||
display: flex; |
|||
align-items: center; |
|||
text-decoration: none; |
|||
padding: 0 0.5em; |
|||
} |
|||
|
|||
|
|||
.overlay-nav.previous { |
|||
left: 0; |
|||
} |
|||
|
|||
.overlay-nav.next { |
|||
right: 0; |
|||
justify-content: flex-end; |
|||
} |
|||
.overlay-nav i { |
|||
position: relative; |
|||
transition: all .5s ease-out; |
|||
} |
|||
|
|||
.overlay-nav.previous i { |
|||
left: -4em; |
|||
} |
|||
|
|||
.overlay-nav.next i { |
|||
right: -4em; |
|||
} |
|||
|
|||
.overlay-nav.previous:hover i { |
|||
left: 0; |
|||
} |
|||
|
|||
.overlay-nav.next:hover i { |
|||
right: 0; |
|||
} |
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 470 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,13 @@ |
|||
{% extends "base.html" %} |
|||
|
|||
{% block content %} |
|||
<ul> |
|||
{% for media in album.medias %} |
|||
<li class="thumbnail"> |
|||
<a href="{{ media.url }}.html"> |
|||
<img src="{{ media.thumbnail }}" alt="{{ media.title }}"> |
|||
</a> |
|||
</li> |
|||
{% endfor %} |
|||
</ul> |
|||
{% endblock %} |
@ -0,0 +1,15 @@ |
|||
{% extends "base.html" %} |
|||
|
|||
|
|||
{% block content %} |
|||
<ul> |
|||
{% for alb in album.albums %} |
|||
<li class="thumbnail"> |
|||
<a href="{{ alb.url }}"> |
|||
<img src="{{ alb.thumbnail }}" alt="{{ alb.name }}" title="{{ alb.name }}"> |
|||
<span>{{ alb.name }}</span> |
|||
</a> |
|||
</li> |
|||
{% endfor %} |
|||
</ul> |
|||
{% endblock %} |
@ -0,0 +1,36 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<title>Mon Album</title> |
|||
<link rel="stylesheet" href="../static/css/main.css"> |
|||
</head> |
|||
<body> |
|||
<header> |
|||
<a class="logo" href="#">Photo gallery</a> |
|||
<nav> |
|||
<ul> |
|||
<li href="#"><a href="#">Home</a></li> |
|||
<li href="#"><a href="#">Photos</a></li> |
|||
</ul> |
|||
</nav> |
|||
</header> |
|||
<main> |
|||
<div class="thumbnail"> |
|||
<a href="#"> |
|||
<img src="placeholder.png"> |
|||
</a> |
|||
</div> |
|||
<div class="thumbnail"> |
|||
<a href="#"> |
|||
<img src="placeholder2.png"> |
|||
</a> |
|||
</div> |
|||
<div class="thumbnail"> |
|||
<a href="#"> |
|||
<img src="placeholder3.jpg"> |
|||
</a> |
|||
</div> |
|||
</main> |
|||
</body> |
|||
</html> |
@ -0,0 +1,30 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="{{ settings.html_language }}"> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta name="author" content="{{ album.author }}"> |
|||
<title>{{ album.title|striptags }}</title> |
|||
|
|||
<link rel="stylesheet" href="{{ theme.url }}/css/main.css"> |
|||
|
|||
{% block extra_head %}{% endblock extra_head %} |
|||
</head> |
|||
<body> |
|||
<header> |
|||
<h1><a class="logo" href="{{ album.index_url }}">{{ index_title }} </a></h1> |
|||
{% if album.breadcrumb %} |
|||
<h2> |
|||
{% for url, title in album.breadcrumb %} |
|||
» <a href="{{ url }}">{{ title }}</a> |
|||
{% endfor -%} |
|||
{% block extra_breadcrumb %} |
|||
{% endblock %} |
|||
</h2> |
|||
{% endif %} |
|||
{% include "links.html" %} |
|||
</header> |
|||
<main> |
|||
{% block content %}{% endblock content %} |
|||
</main> |
|||
</body> |
|||
</html> |
@ -0,0 +1,55 @@ |
|||
{% extends "base.html" %} |
|||
|
|||
{% block extra_head %} |
|||
<link rel="stylesheet" href="{{ theme.url }}/css/media.css"> |
|||
<link rel="stylesheet" href="{{ theme.url }}/fork-awesome/css/fork-awesome.min.css"> |
|||
{% endblock %} |
|||
|
|||
{% block extra_breadcrumb %} |
|||
» <a href="{{ media.url }}.html">{{ media.title }}</a> |
|||
{% endblock %} |
|||
|
|||
{% block content %} |
|||
<div> |
|||
<img src="{{ media.url }}" alt="{{ media.title }}"> |
|||
</div> |
|||
|
|||
{% if previous_media %} |
|||
<a class="overlay-nav previous" href="{{ previous_media.url }}.html"> |
|||
<i class="fa fa-arrow-left fa-4x" aria-hidden="true"></i> |
|||
</a> |
|||
{% endif %} |
|||
|
|||
{% if next_media %} |
|||
<a class="overlay-nav next" href="{{ next_media.url }}.html"> |
|||
<i class="fa fa-arrow-right fa-4x" aria-hidden="true"></i> |
|||
</a> |
|||
{% endif %} |
|||
|
|||
<nav class="media-nav"> |
|||
<ul> |
|||
<li> |
|||
<a |
|||
{% if previous_media %} |
|||
href="{{ previous_media.url }}.html" |
|||
{% endif %} |
|||
aria-label="Previous media"> |
|||
<i class="fa fa-arrow-left fa-lg" aria-hidden="true"></i> |
|||
</a> |
|||
</li> |
|||
|
|||
|
|||
<li>{{ media_index }} / {{ album.medias|length }}</li> |
|||
|
|||
<li> |
|||
<a |
|||
{% if next_media %} |
|||
href="{{ next_media.url }}.html" |
|||
{% endif %} |
|||
aria-label="Next media"> |
|||
<i class="fa fa-arrow-right fa-lg" aria-hidden="true"></i> |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</nav> |
|||
{% endblock %} |
@ -0,0 +1,262 @@ |
|||
# All configuration values have a default; values that are commented out serve |
|||
# to show the default. Default values are specified when modified in this |
|||
# example config file |
|||
|
|||
# Gallery title. Can be set here or as the '--title' option of the `sigal |
|||
# build` command, or in the 'index.md' file of the source directory. |
|||
# The priority order is: cli option > settings file > index.md file |
|||
# title = "Sigal test gallery" |
|||
|
|||
# --------------------- |
|||
# General configuration |
|||
# --------------------- |
|||
|
|||
# Source directory. Can be set here or as the first argument of the `sigal |
|||
# build` command |
|||
source = 'pictures' |
|||
|
|||
# Destination directory. Can be set here or as the second argument of the |
|||
# `sigal build` command (default: '_build') |
|||
# destination = '_build' |
|||
|
|||
# Theme : |
|||
# - colorbox (default), galleria, photoswipe, or the path to a custom theme |
|||
# directory |
|||
theme = 'bksp-photo-theme' |
|||
|
|||
# Author. Used in the footer of the pages and in the author meta tag. |
|||
author = 'Gaël Berthaud-Müller' |
|||
|
|||
# Use originals in gallery (default: False). If True, this will bypass all |
|||
# processing steps (resize, auto-orient, recompress, and any plugin-specific |
|||
# step). |
|||
# Originals will be symlinked if orig_link = True, else they will be copied. |
|||
# use_orig = False |
|||
|
|||
# ---------------- |
|||
# Image processing (ignored if use_orig = True) |
|||
# ---------------- |
|||
|
|||
# Size of resized image (default: (640, 480)) |
|||
img_size = (1500, 1500) |
|||
|
|||
# Show a map of the images where possible? |
|||
# This option only has an effect on the galleria theme for the while. |
|||
# The leaflet_provider setting allow to customize the tile provider (see |
|||
# https://github.com/leaflet-extras/leaflet-providers#providers) |
|||
# show_map = False |
|||
# leaflet_provider = 'OpenStreetMap.Mapnik' |
|||
|
|||
# File extensions that should be treated as images |
|||
# img_extensions = ['.jpg', '.jpeg', '.png', '.gif'] |
|||
|
|||
# Pilkit processor used to resize the image |
|||
# (see http://pilkit.readthedocs.org/en/latest/#processors) |
|||
# - ResizeToFit: fit the image within the specified dimensions (default) |
|||
# - ResizeToFill: crop THE IMAGE it to the exact specified width and height |
|||
# - SmartResize: identical to ResizeToFill, but uses entropy to crop the image |
|||
# - None: don't resize |
|||
# img_processor = 'ResizeToFit' |
|||
|
|||
# Autorotate images |
|||
# Warning: this setting is not compatible with `copy_exif_data` (see below), |
|||
# because Sigal can't save the modified Orientation tag (currently Pillow can't |
|||
# write EXIF). |
|||
# autorotate_images = True |
|||
|
|||
# If True, EXIF data from the original image is copied to the resized image |
|||
# copy_exif_data = False |
|||
|
|||
# Python's datetime format string used for the EXIF date formatting |
|||
# https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior |
|||
# datetime_format = '%c' |
|||
|
|||
# Jpeg options |
|||
# jpg_options = {'quality': 85, |
|||
# 'optimize': True, |
|||
# 'progressive': True} |
|||
|
|||
# -------------------- |
|||
# Thumbnail generation |
|||
# -------------------- |
|||
|
|||
# Generate thumbnails |
|||
# make_thumbs = True |
|||
|
|||
# Subdirectory of the thumbnails |
|||
# thumb_dir = 'thumbnails' |
|||
|
|||
# Prefix and/or suffix for thumbnail filenames (default: '') |
|||
# thumb_prefix = '' |
|||
# thumb_suffix = '.tn' |
|||
|
|||
# Thumbnail size (default: (200, 150)) |
|||
# For the galleria theme, use 280 px for the width |
|||
# For the colorbox and photoswipe theme, use 200 px for the width |
|||
thumb_size = (250, 250) |
|||
|
|||
# Crop the image to fill the box |
|||
thumb_fit = False |
|||
|
|||
# When using thumb_fit, specifies what we should crop |
|||
# for usage see |
|||
# http://pillow.readthedocs.io/en/stable/reference/ImageOps.html#PIL.ImageOps.fit |
|||
# thumb_fit_centering = (0.5, 0.5) |
|||
|
|||
# Delay in seconds to avoid black thumbnails in videos with fade-in |
|||
# thumb_video_delay = '0' |
|||
|
|||
# Keep original image (default: False) |
|||
# keep_orig = True |
|||
|
|||
# Subdirectory for original images |
|||
# orig_dir = 'original' |
|||
|
|||
# Use symbolic links instead of copying the original images |
|||
# orig_link = False |
|||
|
|||
# Attribute of Album objects which is used to sort medias (eg 'title'). To sort |
|||
# on a metadata key, use 'meta.key'. |
|||
# albums_sort_attr = 'name' |
|||
|
|||
# Reverse sort for albums |
|||
# albums_sort_reverse = False |
|||
|
|||
# Attribute of Media objects which is used to sort medias. 'date' can be used |
|||
# to sort with EXIF dates, and 'meta.key' to sort on a metadata key (which then |
|||
# must exist for all images). |
|||
# medias_sort_attr = 'filename' |
|||
|
|||
# Reverse sort for medias |
|||
# medias_sort_reverse = False |
|||
|
|||
# Filter directories and files. |
|||
# The settings take a list of patterns matched with the fnmatch module on the |
|||
# path relative to the source directory: |
|||
# http://docs.python.org/2/library/fnmatch.html |
|||
ignore_directories = [] |
|||
ignore_files = [] |
|||
|
|||
# ------------- |
|||
# Video options |
|||
# ------------- |
|||
|
|||
# Video converter binary (can be 'avconv' on certain GNU/Linux distributions) |
|||
# video_converter = 'ffmpeg' |
|||
|
|||
# File extensions that should be treated as video files |
|||
# video_extensions = ['.mov', '.avi', '.mp4', '.webm', '.ogv', '.3gp'] |
|||
|
|||
# Video format |
|||
# specify an alternative format, valid are 'webm' (default) and 'mp4' |
|||
# video_format = 'webm' |
|||
|
|||
# Webm options |
|||
# Options used in ffmpeg to encode the webm video. You may want to read |
|||
# http://ffmpeg.org/trac/ffmpeg/wiki/vpxEncodingGuide |
|||
# Be aware of the fact these options need to be passed as strings. If you are |
|||
# using avconv (for example with Ubuntu), you will need to adapt the settings. |
|||
# webm_options = ['-crf', '10', '-b:v', '1.6M', |
|||
# '-qmin', '4', '-qmax', '63'] |
|||
|
|||
# MP4 options |
|||
# Options used to encode the mp4 video. You may want to read |
|||
# https://trac.ffmpeg.org/wiki/Encode/H.264 |
|||
# mp4_options = ['-crf', '23' ] |
|||
|
|||
# Size of resized video (default: (480, 360)) |
|||
# video_size = (480, 360) |
|||
|
|||
# ------------- |
|||
# Miscellaneous |
|||
# ------------- |
|||
|
|||
# Write HTML files. If False, sigal will only process the images. |
|||
# write_html = True |
|||
|
|||
# Name of the generated HTML files |
|||
# output_filename = 'index.html' |
|||
|
|||
# Add output filename (see above) to the URLs |
|||
index_in_url = False |
|||
|
|||
# A list of links (tuples (title, URL)) |
|||
# links = [('Example link', 'http://example.org'), |
|||
# ('Another link', 'http://example.org')] |
|||
|
|||
# Google Analytics tracking code (UA-xxxx-x) |
|||
# google_analytics = '' |
|||
|
|||
# Google Tag Manager tracking code (GTM-xxxxxx) |
|||
# google_tag_manager = '' |
|||
|
|||
# Piwik tracking |
|||
# tracker_url must not contain trailing slash. |
|||
# Example : {'tracker_url': 'http://stats.domain.com', 'site_id' : 2} |
|||
# piwik = {'tracker_url': '', 'site_id' : 0} |
|||
|
|||
# Set zip_gallery to either False or a file name. The file name can be formatted |
|||
# python style with an 'album' variable, for example '{album.name}.zip'. The final archive will |
|||
# contain all resized or original files (depending on `zip_media_format`). |
|||
# zip_gallery = False # False or 'archive.zip' |
|||
# zip_media_format = 'resized' # 'resized' or 'orig' |
|||
# zip_skip_if_exists = False # Skip archive generation if archive is already present. Warning: new photos in an album won't be added to archive |
|||
|
|||
# Specify a different locale. If set to '', the default locale is used. |
|||
# locale = '' |
|||
|
|||
# Define language used on main <html> tag in templates |
|||
# html_language = 'en' |
|||
|
|||
# List of files to copy from the source directory to the destination. |
|||
# A symbolic link is used if ``orig_link`` is set to True (see above). |
|||
# files_to_copy = (('extra/robots.txt', 'robots.txt'), |
|||
# ('extra/favicon.ico', 'favicon.ico'),) |
|||
|
|||
# Colorbox theme config |
|||
# The column size is given in number of column of the css grid of the Skeleton |
|||
# framework which is used for this theme: http://www.getskeleton.com/#grid |
|||
# Then the image size must be adapted to fit the column size. |
|||
# The default is 3 columns (176px). |
|||
# colorbox_column_size = 3 |
|||
|
|||
# Site Logo - Use a logo file in the sidebar |
|||
# Only for colorbox currently, it could be adapted for other themes |
|||
# You must place the logo file into the theme's static images folder, which |
|||
# can be done using 'files_to_copy': |
|||
# files_to_copy = (('extra/logo.png', 'static/logo.png')) |
|||
# site_logo = 'logo.png' |
|||
|
|||
# -------- |
|||
# Plugins |
|||
# -------- |
|||
|
|||
# List of plugins to use. The values must be a path than can be imported. |
|||
# Another option is to import the plugin and put the module in the list, but |
|||
# this will break with the multiprocessing feature (the settings dict obtained |
|||
# from this file must be serializable). |
|||
# plugins = ['sigal.plugins.adjust', 'sigal.plugins.copyright', |
|||
# 'sigal.plugins.upload_s3', 'sigal.plugins.media_page', |
|||
# 'sigal.plugins.nomedia', 'sigal.plugins.extended_caching'] |
|||
plugins = ['bksp_photo_plugins.media_page'] |
|||
# Add a copyright text on the image (default: '') |
|||
# copyright = "© An example copyright message" |
|||
|
|||
# Adjust the image after resizing it. A default value of 1.0 leaves the images |
|||
# untouched. |
|||
# adjust_options = {'color': 1.0, |
|||
# 'brightness': 1.0, |
|||
# 'contrast': 1.0, |
|||
# 'sharpness': 1.0} |
|||
|
|||
# Settings for upload to s3 plugin |
|||
# upload_s3_options = { |
|||
# 'bucket': 'my-bucket', |
|||
# 'policy': 'public-read', |
|||
# 'overwrite': False |
|||
# } |
|||
|
|||
# Settings for compressing static assets |
|||
# compress_assets_options = { |
|||
# 'method': 'gzip' # Or 'zopfli' or 'brotli' |
|||
# } |
@ -0,0 +1,262 @@ |
|||
# All configuration values have a default; values that are commented out serve |
|||
# to show the default. Default values are specified when modified in this |
|||
# example config file |
|||
|
|||
# Gallery title. Can be set here or as the '--title' option of the `sigal |
|||
# build` command, or in the 'index.md' file of the source directory. |
|||
# The priority order is: cli option > settings file > index.md file |
|||
# title = "Sigal test gallery" |
|||
|
|||
# --------------------- |
|||
# General configuration |
|||
# --------------------- |
|||
|
|||
# Source directory. Can be set here or as the first argument of the `sigal |
|||
# build` command |
|||
source = 'pictures' |
|||
|
|||
# Destination directory. Can be set here or as the second argument of the |
|||
# `sigal build` command (default: '_build') |
|||
# destination = '_build' |
|||
|
|||
# Theme : |
|||
# - colorbox (default), galleria, photoswipe, or the path to a custom theme |
|||
# directory |
|||
theme = 'bksp-photo-theme' |
|||
|
|||
# Author. Used in the footer of the pages and in the author meta tag. |
|||
author = 'Gaël Berthaud-Müller' |
|||
|
|||
# Use originals in gallery (default: False). If True, this will bypass all |
|||
# processing steps (resize, auto-orient, recompress, and any plugin-specific |
|||
# step). |
|||
# Originals will be symlinked if orig_link = True, else they will be copied. |
|||
# use_orig = False |
|||
|
|||
# ---------------- |
|||
# Image processing (ignored if use_orig = True) |
|||
# ---------------- |
|||
|
|||
# Size of resized image (default: (640, 480)) |
|||
img_size = (1500, 1500) |
|||
|
|||
# Show a map of the images where possible? |
|||
# This option only has an effect on the galleria theme for the while. |
|||
# The leaflet_provider setting allow to customize the tile provider (see |
|||
# https://github.com/leaflet-extras/leaflet-providers#providers) |
|||
# show_map = False |
|||
# leaflet_provider = 'OpenStreetMap.Mapnik' |
|||
|
|||
# File extensions that should be treated as images |
|||
# img_extensions = ['.jpg', '.jpeg', '.png', '.gif'] |
|||
|
|||
# Pilkit processor used to resize the image |
|||
# (see http://pilkit.readthedocs.org/en/latest/#processors) |
|||
# - ResizeToFit: fit the image within the specified dimensions (default) |
|||
# - ResizeToFill: crop THE IMAGE it to the exact specified width and height |
|||
# - SmartResize: identical to ResizeToFill, but uses entropy to crop the image |
|||
# - None: don't resize |
|||
# img_processor = 'ResizeToFit' |
|||
|
|||
# Autorotate images |
|||
# Warning: this setting is not compatible with `copy_exif_data` (see below), |
|||
# because Sigal can't save the modified Orientation tag (currently Pillow can't |
|||
# write EXIF). |
|||
# autorotate_images = True |
|||
|
|||
# If True, EXIF data from the original image is copied to the resized image |
|||
# copy_exif_data = False |
|||
|
|||
# Python's datetime format string used for the EXIF date formatting |
|||
# https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior |
|||
# datetime_format = '%c' |
|||
|
|||
# Jpeg options |
|||
# jpg_options = {'quality': 85, |
|||
# 'optimize': True, |
|||
# 'progressive': True} |
|||
|
|||
# -------------------- |
|||
# Thumbnail generation |
|||
# -------------------- |
|||
|
|||
# Generate thumbnails |
|||
# make_thumbs = True |
|||
|
|||
# Subdirectory of the thumbnails |
|||
# thumb_dir = 'thumbnails' |
|||
|
|||
# Prefix and/or suffix for thumbnail filenames (default: '') |
|||
# thumb_prefix = '' |
|||
# thumb_suffix = '.tn' |
|||
|
|||
# Thumbnail size (default: (200, 150)) |
|||
# For the galleria theme, use 280 px for the width |
|||
# For the colorbox and photoswipe theme, use 200 px for the width |
|||
thumb_size = (250, 250) |
|||
|
|||
# Crop the image to fill the box |
|||
thumb_fit = False |
|||
|
|||
# When using thumb_fit, specifies what we should crop |
|||
# for usage see |
|||
# http://pillow.readthedocs.io/en/stable/reference/ImageOps.html#PIL.ImageOps.fit |
|||
# thumb_fit_centering = (0.5, 0.5) |
|||
|
|||
# Delay in seconds to avoid black thumbnails in videos with fade-in |
|||
# thumb_video_delay = '0' |
|||
|
|||
# Keep original image (default: False) |
|||
# keep_orig = True |
|||
|
|||
# Subdirectory for original images |
|||
# orig_dir = 'original' |
|||
|
|||
# Use symbolic links instead of copying the original images |
|||
# orig_link = False |
|||
|
|||
# Attribute of Album objects which is used to sort medias (eg 'title'). To sort |
|||
# on a metadata key, use 'meta.key'. |
|||
# albums_sort_attr = 'name' |
|||
|
|||
# Reverse sort for albums |
|||
# albums_sort_reverse = False |
|||
|
|||
# Attribute of Media objects which is used to sort medias. 'date' can be used |
|||
# to sort with EXIF dates, and 'meta.key' to sort on a metadata key (which then |
|||
# must exist for all images). |
|||
# medias_sort_attr = 'filename' |
|||
|
|||
# Reverse sort for medias |
|||
# medias_sort_reverse = False |
|||
|
|||
# Filter directories and files. |
|||
# The settings take a list of patterns matched with the fnmatch module on the |
|||
# path relative to the source directory: |
|||
# http://docs.python.org/2/library/fnmatch.html |
|||
ignore_directories = [] |
|||
ignore_files = [] |
|||
|
|||
# ------------- |
|||
# Video options |
|||
# ------------- |
|||
|
|||
# Video converter binary (can be 'avconv' on certain GNU/Linux distributions) |
|||
# video_converter = 'ffmpeg' |
|||
|
|||
# File extensions that should be treated as video files |
|||
# video_extensions = ['.mov', '.avi', '.mp4', '.webm', '.ogv', '.3gp'] |
|||
|
|||
# Video format |
|||
# specify an alternative format, valid are 'webm' (default) and 'mp4' |
|||
# video_format = 'webm' |
|||
|
|||
# Webm options |
|||
# Options used in ffmpeg to encode the webm video. You may want to read |
|||
# http://ffmpeg.org/trac/ffmpeg/wiki/vpxEncodingGuide |
|||
# Be aware of the fact these options need to be passed as strings. If you are |
|||
# using avconv (for example with Ubuntu), you will need to adapt the settings. |
|||
# webm_options = ['-crf', '10', '-b:v', '1.6M', |
|||
# '-qmin', '4', '-qmax', '63'] |
|||
|
|||
# MP4 options |
|||
# Options used to encode the mp4 video. You may want to read |
|||
# https://trac.ffmpeg.org/wiki/Encode/H.264 |
|||
# mp4_options = ['-crf', '23' ] |
|||
|
|||
# Size of resized video (default: (480, 360)) |
|||
# video_size = (480, 360) |
|||
|
|||
# ------------- |
|||
# Miscellaneous |
|||
# ------------- |
|||
|
|||
# Write HTML files. If False, sigal will only process the images. |
|||
# write_html = True |
|||
|
|||
# Name of the generated HTML files |
|||
# output_filename = 'index.html' |
|||
|
|||
# Add output filename (see above) to the URLs |
|||
index_in_url = True |
|||
|
|||
# A list of links (tuples (title, URL)) |
|||
# links = [('Example link', 'http://example.org'), |
|||
# ('Another link', 'http://example.org')] |
|||
|
|||
# Google Analytics tracking code (UA-xxxx-x) |
|||
# google_analytics = '' |
|||
|
|||
# Google Tag Manager tracking code (GTM-xxxxxx) |
|||
# google_tag_manager = '' |
|||
|
|||
# Piwik tracking |
|||
# tracker_url must not contain trailing slash. |
|||
# Example : {'tracker_url': 'http://stats.domain.com', 'site_id' : 2} |
|||
# piwik = {'tracker_url': '', 'site_id' : 0} |
|||
|
|||
# Set zip_gallery to either False or a file name. The file name can be formatted |
|||
# python style with an 'album' variable, for example '{album.name}.zip'. The final archive will |
|||
# contain all resized or original files (depending on `zip_media_format`). |
|||
# zip_gallery = False # False or 'archive.zip' |
|||
# zip_media_format = 'resized' # 'resized' or 'orig' |
|||
# zip_skip_if_exists = False # Skip archive generation if archive is already present. Warning: new photos in an album won't be added to archive |
|||
|
|||
# Specify a different locale. If set to '', the default locale is used. |
|||
# locale = '' |
|||
|
|||
# Define language used on main <html> tag in templates |
|||
# html_language = 'en' |
|||
|
|||
# List of files to copy from the source directory to the destination. |
|||
# A symbolic link is used if ``orig_link`` is set to True (see above). |
|||
# files_to_copy = (('extra/robots.txt', 'robots.txt'), |
|||
# ('extra/favicon.ico', 'favicon.ico'),) |
|||
|
|||
# Colorbox theme config |
|||
# The column size is given in number of column of the css grid of the Skeleton |
|||
# framework which is used for this theme: http://www.getskeleton.com/#grid |
|||
# Then the image size must be adapted to fit the column size. |
|||
# The default is 3 columns (176px). |
|||
# colorbox_column_size = 3 |
|||
|
|||
# Site Logo - Use a logo file in the sidebar |
|||
# Only for colorbox currently, it could be adapted for other themes |
|||
# You must place the logo file into the theme's static images folder, which |
|||
# can be done using 'files_to_copy': |
|||
# files_to_copy = (('extra/logo.png', 'static/logo.png')) |
|||
# site_logo = 'logo.png' |
|||
|
|||
# -------- |
|||
# Plugins |
|||
# -------- |
|||
|
|||
# List of plugins to use. The values must be a path than can be imported. |
|||
# Another option is to import the plugin and put the module in the list, but |
|||
# this will break with the multiprocessing feature (the settings dict obtained |
|||
# from this file must be serializable). |
|||
# plugins = ['sigal.plugins.adjust', 'sigal.plugins.copyright', |
|||
# 'sigal.plugins.upload_s3', 'sigal.plugins.media_page', |
|||
# 'sigal.plugins.nomedia', 'sigal.plugins.extended_caching'] |
|||
plugins = ['bksp_photo_plugins.media_page'] |
|||
# Add a copyright text on the image (default: '') |
|||
# copyright = "© An example copyright message" |
|||
|
|||
# Adjust the image after resizing it. A default value of 1.0 leaves the images |
|||
# untouched. |
|||
# adjust_options = {'color': 1.0, |
|||
# 'brightness': 1.0, |
|||
# 'contrast': 1.0, |
|||
# 'sharpness': 1.0} |
|||
|
|||
# Settings for upload to s3 plugin |
|||
# upload_s3_options = { |
|||
# 'bucket': 'my-bucket', |
|||
# 'policy': 'public-read', |
|||
# 'overwrite': False |
|||
# } |
|||
|
|||
# Settings for compressing static assets |
|||
# compress_assets_options = { |
|||
# 'method': 'gzip' # Or 'zopfli' or 'brotli' |
|||
# } |
Loading…
Reference in new issue