From 7c8d17fbcb552121437a2df397a637b431c34b8c Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Fri, 4 Nov 2016 14:37:46 +0100 Subject: [PATCH] fix bug og:image --- prosopopee/prosopopee.py | 3 ++- prosopopee/themes/exposure/templates/opengraph.html | 4 +++- prosopopee/themes/light/templates/opengraph.html | 4 +++- prosopopee/themes/material/templates/opengraph.html | 4 +++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index f355480..7c3ef6a 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -363,7 +363,8 @@ def build_gallery(settings, gallery_settings, gallery_path, template): gallery=gallery_settings, Image=Image, Video=Video, - link=gallery_path + link=gallery_path, + name=gallery_path.split('/', 1)[-1] ).encode("Utf-8") open(Path("build").joinpath(gallery_path, "index.html"), "w").write(html) diff --git a/prosopopee/themes/exposure/templates/opengraph.html b/prosopopee/themes/exposure/templates/opengraph.html index fbcbb89..f2e75d1 100644 --- a/prosopopee/themes/exposure/templates/opengraph.html +++ b/prosopopee/themes/exposure/templates/opengraph.html @@ -1,5 +1,7 @@ + +{% set absolute_url = settings.url + "/" + name %} - + {% if gallery.description %} diff --git a/prosopopee/themes/light/templates/opengraph.html b/prosopopee/themes/light/templates/opengraph.html index fbcbb89..f2e75d1 100644 --- a/prosopopee/themes/light/templates/opengraph.html +++ b/prosopopee/themes/light/templates/opengraph.html @@ -1,5 +1,7 @@ + +{% set absolute_url = settings.url + "/" + name %} - + {% if gallery.description %} diff --git a/prosopopee/themes/material/templates/opengraph.html b/prosopopee/themes/material/templates/opengraph.html index fbcbb89..f2e75d1 100644 --- a/prosopopee/themes/material/templates/opengraph.html +++ b/prosopopee/themes/material/templates/opengraph.html @@ -1,5 +1,7 @@ + +{% set absolute_url = settings.url + "/" + name %} - + {% if gallery.description %}