Merge pull request #67 from Psycojoker/og

Add open graph meta + add little features
This commit is contained in:
Laurent Peuch 2016-12-11 18:51:33 +01:00 committed by GitHub
commit 9aa5554a0d
29 changed files with 766 additions and 716 deletions

View File

@ -176,6 +176,17 @@ For activate the RSS you need add this key in **root** settings.yaml::
url: "http://prosopopee.com" url: "http://prosopopee.com"
Open Graph Meta
~~~~~~~~~~~~~~~
For activate the Open Graph Meta you need add this key in **root** settings.yaml::
og: true
Optionnal: You need use description and lang key in settings gallery.
for more informations about Open Graph http://ogp.me/
Gallery settings.yaml Gallery settings.yaml
--------------------- ---------------------
@ -196,6 +207,8 @@ _______
sub_title: Gallery sub-title sub_title: Gallery sub-title
date: 2016-01-15 date: 2016-01-15
cover: my_cover_picture.jpg cover: my_cover_picture.jpg
description: Some text
lang: en_US
tags: tags:
- #yolo - #yolo
- #travel - #travel

View File

@ -46,6 +46,12 @@ Without text::
- type: full-picture - type: full-picture
image: big_picture.jpg image: big_picture.jpg
If you want fixed backgroup use can use this optionnal option (only with the exposure theme)::
- type: full-picture
fixed: true
Bordered picture Bordered picture
________________ ________________

View File

@ -363,7 +363,8 @@ def build_gallery(settings, gallery_settings, gallery_path, template):
gallery=gallery_settings, gallery=gallery_settings,
Image=Image, Image=Image,
Video=Video, Video=Video,
link=gallery_path link=gallery_path,
name=gallery_path.split('/', 1)[-1]
).encode("Utf-8") ).encode("Utf-8")
open(Path("build").joinpath(gallery_path, "index.html"), "w").write(html) open(Path("build").joinpath(gallery_path, "index.html"), "w").write(html)
@ -393,7 +394,8 @@ def build_gallery(settings, gallery_settings, gallery_path, template):
gallery=gallery_settings, gallery=gallery_settings,
Image=Image, Image=Image,
Video=Video, Video=Video,
link=gallery_light_path link=gallery_light_path,
name=gallery_path.split('/', 1)[-1]
).encode("Utf-8") ).encode("Utf-8")
open(Path("build").joinpath(gallery_light_path, "index.html"), "w").write(html) open(Path("build").joinpath(gallery_light_path, "index.html"), "w").write(html)

View File

@ -4,32 +4,26 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
{% block css %} {% block css %}
{% endblock %} {% endblock %}
{% if settings.rss -%} {% if settings.rss %}
<link rel="alternate" type="application/rss+xml" title="{{ settings.title }}" href="{{ settings.url }}/feed.xml" /> <link rel="alternate" type="application/rss+xml" title="{{ settings.title }}" href="{{ settings.url }}/feed.xml" />
{% endif -%} {% endif %}
<!--Let browser know website is optimized for mobile--> <!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>{{ settings.title }}</title> <title>{{ settings.title }}</title>
</head> </head>
<body> <body>
<div class="gallery-header"> <div class="gallery-header">
{% block logo %} {% block logo %}
{% endblock %} {% endblock %}
<h1>{{ settings.title }}</h1> <h1>{{ settings.title }}</h1>
{% if settings.sub_title -%}<h4>{{ settings.sub_title }}</h4>{% endif -%} {% if settings.sub_title %}<h4>{{ settings.sub_title }}</h4>{% endif %}
<hr> <hr>
{% if settings.menu -%} {% if settings.menu %}
{% include 'menu.html' %} {% include 'menu.html' %}
{% endif -%} {% endif -%}
</div> </div>
{% block content %} {% block content %}
{% endblock %} {% endblock %}
{% include 'footer.html' %} {% include 'footer.html' %}
</body> </body>
</html> </html>

View File

@ -1,11 +1,10 @@
{% if settings.licence is not defined %} {% if settings.licence is not defined %}
{% set licence_url = 'https://creativecommons.org/licenses/by-sa/3.0/' -%} {% set licence_url = 'https://creativecommons.org/licenses/by-sa/3.0/' %}
{% set licence_name = 'CC-BY-SA' -%} {% set licence_name = 'CC-BY-SA' %}
{% else %} {% else %}
{% set licence_url = settings.licence.url -%} {% set licence_url = settings.licence.url %}
{% set licence_name = settings.licence.name -%} {% set licence_name = settings.licence.name %}
{% endif %} {% endif %}
<footer> <footer>
<p>Generated using <a href="https://github.com/psycojoker/prosopopee">Prosopopée</a> · content under <a href="{{ licence_url }}">{{ licence_name }}</a> · atom logo by <a href="https://thenounproject.com/jjjon/">Jonathan Li</a> under <a href="https://creativecommons.org/licenses/by/3.0/">CC-BY</a></p> <p>Generated using <a href="https://github.com/psycojoker/prosopopee">Prosopopée</a> · content under <a href="{{ licence_url }}">{{ licence_name }}</a> · atom logo by <a href="https://thenounproject.com/jjjon/">Jonathan Li</a> under <a href="https://creativecommons.org/licenses/by/3.0/">CC-BY</a></p>
</footer> </footer>

View File

@ -7,7 +7,6 @@
<link type="text/css" rel="stylesheet" href="../static/css/style-page.css" media="screen,projection"/> <link type="text/css" rel="stylesheet" href="../static/css/style-page.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="../static/css/baguetteBox.min.css" media="screen,projection"/> <link type="text/css" rel="stylesheet" href="../static/css/baguetteBox.min.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="../static/css/panorama_viewer.css" media="screen,projection"/> <link type="text/css" rel="stylesheet" href="../static/css/panorama_viewer.css" media="screen,projection"/>
<!--Let browser know website is optimized for mobile--> <!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
{% if gallery.description %} {% if gallery.description %}
@ -16,18 +15,18 @@
{% if gallery.lang %} {% if gallery.lang %}
<meta name="language" content="{{ gallery.lang }}" /> <meta name="language" content="{{ gallery.lang }}" />
{% endif %} {% endif %}
{% if settings.settings.og %}
{% include "opengraph.html" %}
{% endif %}
<title>{{ gallery.title }} · {{ settings.title }}</title> <title>{{ gallery.title }} · {{ settings.title }}</title>
</head> </head>
<body> <body>
{% for section in gallery.sections %} {% for section in gallery.sections %}
{% include "sections/" + section.type + ".html" %} {% include "sections/" + section.type + ".html" %}
{% endfor %} {% endfor %}
{% if settings.share %} {% if settings.share %}
{% include "share.html" %} {% include "share.html" %}
{% endif %} {% endif %}
<div class="back-to-home"> <div class="back-to-home">
<hr> <hr>
<a href="../"> <a href="../">
@ -36,7 +35,6 @@
</div> </div>
</a> </a>
</div> </div>
<script type="text/javascript" src="../static/js/jquery-2.1.4.min.js" charset="utf-8"></script> <script type="text/javascript" src="../static/js/jquery-2.1.4.min.js" charset="utf-8"></script>
<script type="text/javascript" src="../static/js/baguetteBox.min.js" charset="utf-8"></script> <script type="text/javascript" src="../static/js/baguetteBox.min.js" charset="utf-8"></script>
<script type="text/javascript" src="../static/js/jquery.panorama_viewer.min.js" charset="utf-8"></script> <script type="text/javascript" src="../static/js/jquery.panorama_viewer.min.js" charset="utf-8"></script>
@ -123,10 +121,7 @@ window.addEventListener( 'load', function() {
}); });
{% endif %} {% endif %}
</script> </script>
{% include "footer.html" %} {% include "footer.html" %}
</body> </body>
</html> </html>

View File

@ -1,9 +1,9 @@
{% set absolute_url = absolute_url+ gallery.link+"/" -%} {% set absolute_url = absolute_url+ gallery.link+"/" %}
<item> <item>
<title>{{ gallery.title }}</title> <title>{{ gallery.title }}</title>
<link>{{ absolute_url }}</link> <link>{{ absolute_url }}</link>
<guid>{{ gallery.link }}</guid> <guid>{{ gallery.link }}</guid>
{% if gallery.sub_title -%} {% if gallery.sub_title %}
<description>{{ gallery.sub_title }}</description> <description>{{ gallery.sub_title }}</description>
{% endif -%} {% endif -%}
<pubDate>{{ gallery.date }}</pubDate> <pubDate>{{ gallery.date }}</pubDate>
@ -13,4 +13,3 @@
{% include "item.html" %} {% include "item.html" %}
{% endwith %} {% endwith %}
{% endfor %} {% endfor %}

View File

@ -1,19 +1,19 @@
<nav> <nav>
<div class="nav-wrapper"> <div class="nav-wrapper">
<ul> <ul>
{%- for line in settings.menu -%} {% for line in settings.menu %}
{% set file_name, menu_name = line.items()[0] %} {% set file_name, menu_name = line.items()[0] %}
{% if file_name.startswith('http') %} {% if file_name.startswith('http') %}
{% set file_name = file_name %} {% set file_name = file_name %}
{% elif gallery %} {% elif gallery %}
{% set file_name = "../"+file_name %} {% set file_name = "../"+file_name %}
{%- endif -%} {% endif %}
{%- if loop.first -%} {% if loop.first %}
<li><a href={{ file_name }} class=first-item-menu>{{ menu_name }}</a></li> <li><a href={{ file_name }} class=first-item-menu>{{ menu_name }}</a></li>
{% else %} {% else %}
<li><a href={{ file_name }} class=item-menu>{{ menu_name }}</a></li> <li><a href={{ file_name }} class=item-menu>{{ menu_name }}</a></li>
{%- endif -%} {% endif %}
{%- endfor -%} {% endfor %}
</ul> </ul>
</div> </div>
</nav> </nav>

View File

@ -0,0 +1,16 @@
{% set absolute_url = settings.url + "/" + name + "/" %}
{% set cover = Image(gallery.cover) %}
{{ cover.copy() }}
<meta property="og:title" content="{{ gallery.title }}"/>
<meta property="og:image" content="{{ absolute_url }}{{ cover.generate_thumbnail("x900") }}"/>
<meta property="og:site_name" content="{{ settings.title }}"/>
{% if gallery.description %}
<meta property="og:description" content="{{ gallery.description }}"/>
{% endif %}
<meta property="og:type" content="article"/>
<meta property="article:published_time" content="{{ gallery.date }}">
{% if gallery.tags %}
{% for tag in gallery.tags %}
<meta property="article:tag" content="{{ tag }}">
{% endfor %}
{% endif %}

View File

@ -1,24 +1,19 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block css %} {% block css %}
<link type="text/css" rel="stylesheet" href="../static/css/fonts.css" media="screen,projection"/> <link type="text/css" rel="stylesheet" href="../static/css/fonts.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="../static/css/style.css" media="screen,projection"/> <link type="text/css" rel="stylesheet" href="../static/css/style.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="../static/css/style-page.css" media="screen,projection"/> <link type="text/css" rel="stylesheet" href="../static/css/style-page.css" media="screen,projection"/>
{% endblock %} {% endblock %}
{% block logo %} {% block logo %}
<img id="logo" src="../static/img/logo.svg" /> <img id="logo" src="../static/img/logo.svg" />
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<section class="text"> <section class="text">
<h2>{{ gallery.title }}</h2> <h2>{{ gallery.title }}</h2>
</section> </section>
{% for section in gallery.sections %} {% for section in gallery.sections %}
{% include "sections/" + section.type + ".html" %} {% include "sections/" + section.type + ".html" %}
{% endfor %} {% endfor %}
<div class="back-to-home"> <div class="back-to-home">
<hr> <hr>
<a href="../index.html"> <a href="../index.html">
@ -27,6 +22,5 @@
</div> </div>
</a> </a>
</div> </div>
<script type="text/javascript" src="../static/js/jquery-2.1.4.min.js" charset="utf-8"></script> <script type="text/javascript" src="../static/js/jquery-2.1.4.min.js" charset="utf-8"></script>
{% endblock %} {% endblock %}

View File

@ -1,7 +1,6 @@
{% if section.background %} {% if section.background %}
<div class="bg-section" style="background: {{ section.background }};"> <div class="bg-section" style="background: {{ section.background }};">
{% endif %} {% endif %}
{% if section.image.type == "video" %} {% if section.image.type == "video" %}
{% set video = Video(section.image) %} {% set video = Video(section.image) %}
{% set caption = section.text %} {% set caption = section.text %}
@ -32,11 +31,11 @@
data-at-1920="{{ image.generate_thumbnail("x1920") }}" data-at-1920="{{ image.generate_thumbnail("x1920") }}"
> >
<picture> <picture>
<source srcset="{{ image.generate_thumbnail("x450") }}" media="(max-width: 450px)"> <source srcset="{{ image.generate_thumbnail("x450") }}" media="(max-width: 450px)"/>
<source srcset="{{ image.generate_thumbnail("x800") }}" media="(max-width: 800px)"> <source srcset="{{ image.generate_thumbnail("x800") }}" media="(max-width: 800px)"/>
<source srcset="{{ image.generate_thumbnail("x1366") }}" media="(max-width: 1366px)"> <source srcset="{{ image.generate_thumbnail("x1366") }}" media="(max-width: 1366px)"/>
<source srcset="{{ image.generate_thumbnail("x1920") }}" media="(max-width: 1920px)"> <source srcset="{{ image.generate_thumbnail("x1920") }}" media="(max-width: 1920px)"/>
<img src="{{ image }}" data-original="{{ image }}" alt=""> <img src="{{ image }}" data-original="{{ image }}" alt=""/>
</picture> </picture>
{% if caption %} {% if caption %}
<div class="caption__overlay"> <div class="caption__overlay">
@ -47,7 +46,6 @@
</div> </div>
</section> </section>
{% endif %} {% endif %}
{% if section.background %} {% if section.background %}
</div> </div>
{% endif %} {% endif %}

View File

@ -1,7 +1,6 @@
{% if section.image.type == "video" %} {% if section.image.type == "video" %}
{% set video = Video(section.image) %} {% set video = Video(section.image) %}
{{ video.copy() }} {{ video.copy() }}
<section class="full-picture"> <section class="full-picture">
<div class="video-container"> <div class="video-container">
{% if section.text %} {% if section.text %}
@ -18,22 +17,16 @@
</div> </div>
</div> </div>
{% endif %} {% endif %}
<video autoplay loop muted class="fillWidth"> <video autoplay loop muted class="fillWidth">
<source src="{{ video }}" type="video/webm" data-source="{{ video }}" data-format="vp8" data-extension="webm"> <source src="{{ video }}" type="video/webm" data-source="{{ video }}" data-format="vp8" data-extension="webm">
</video> </video>
<img class="lazy full-picture" src="{{ video.generate_thumbnail("2000") }}"> <img class="lazy full-picture" src="{{ video.generate_thumbnail("2000") }}">
</div> </div>
</section> </section>
{% else %} {% else %}
{% set image = Image(section.image) %} {% set image = Image(section.image) %}
{{ image.copy() }} {{ image.copy() }}
<section class="full-picture" style="background: url('{{ image.generate_thumbnail("x2000") }}') no-repeat {% if section.fixed %} fixed {% else %} scroll {% endif %} center top / cover, url('{{ image.generate_thumbnail("x450") }}') no-repeat {% if section.fixed %} fixed {% else %} scroll {% endif %} center top / cover transparent;">
<section class="full-picture" style="background: url('{{ image.generate_thumbnail("x2000") }}') no-repeat fixed center top / cover, url('{{ image.generate_thumbnail("x450") }}') no-repeat fixed center top / cover transparent;">
{% if section.text %} {% if section.text %}
<div class="picture-text"> <div class="picture-text">
<div class="picture-text-column"> <div class="picture-text-column">
@ -48,6 +41,5 @@
</div> </div>
</div> </div>
{% endif %} {% endif %}
</section> </section>
{% endif %} {% endif %}

View File

@ -1,5 +1,5 @@
{% if section.background or section.color %} {% if section.background or section.color %}
<div class="bg-section" style="{% if section.background -%};background: {{ section.background }};{% endif %}{% if section.color -%}color: {{ section.color }};{% endif %}"> <div class="bg-section" style="{% if section.background %};background: {{ section.background }};{% endif %}{% if section.color %}color: {{ section.color }};{% endif %}">
{% endif %} {% endif %}
<section class="html"> <section class="html">
<center> <center>

View File

@ -1,18 +1,14 @@
{% if section.background or section.color %} {% if section.background or section.color %}
<div class="bg-section" style="{% if section.background -%}background: {{ section.background }};{% endif %}{% if section.color -%}color: {{ section.color }};{% endif %}"> <div class="bg-section" style="{% if section.background %}background: {{ section.background }};{% endif %}{% if section.color %}color: {{ section.color }};{% endif %}">
{% endif %} {% endif %}
<section class="paragraph"> <section class="paragraph">
{% if section.title %} {% if section.title %}
<h2>{{ section.title }}</h2> <h2>{{ section.title }}</h2>
{% else %} {% else %}
<div class="separator"></div> <div class="separator"></div>
{% endif %} {% endif %}
<p>{{ section.text }}</p> <p>{{ section.text }}</p>
</section> </section>
{% if section.background or section.color %} {% if section.background or section.color %}
</div> </div>
{% endif %} {% endif %}

View File

@ -1,7 +1,6 @@
{% if section.background %} {% if section.background %}
<div class="bg-section" style="background: {{ section.background }};"> <div class="bg-section" style="background: {{ section.background }};">
{% endif %} {% endif %}
<section class="pictures-group baguette"> <section class="pictures-group baguette">
{% for line in section.images %} {% for line in section.images %}
<div class="pictures-line"> <div class="pictures-line">
@ -11,7 +10,6 @@
{% set caption = image.text %} {% set caption = image.text %}
{% set video = Video(image) %} {% set video = Video(image) %}
{{ video.copy() }} {{ video.copy() }}
<img class="lazy" data-original="{{ video.generate_thumbnail("600") }}" src="" alt=""> <img class="lazy" data-original="{{ video.generate_thumbnail("600") }}" src="" alt="">
<video class="lazy" id="video" poster="{{ video.generate_thumbnail("600") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted> <video class="lazy" id="video" poster="{{ video.generate_thumbnail("600") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
<source src="{{ video }}" type="video/webm" data-source="{{ video }}" data-format="vp8" data-extension="webm"> <source src="{{ video }}" type="video/webm" data-source="{{ video }}" data-format="vp8" data-extension="webm">
@ -21,7 +19,6 @@
<h5 class="caption__overlay__title">{{ caption }}</h5> <h5 class="caption__overlay__title">{{ caption }}</h5>
</div> </div>
{% endif %} {% endif %}
{% else %} {% else %}
{% set caption = image.text %} {% set caption = image.text %}
{% set image = Image(image) %} {% set image = Image(image) %}
@ -39,21 +36,15 @@
</div> </div>
{% endif %} {% endif %}
</a> </a>
{% endif %} {% endif %}
</div> </div>
{% if not loop.last %} {% if not loop.last %}
<div class="separator"></div> <div class="separator"></div>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div> </div>
{% endfor %} {% endfor %}
</section> </section>
{% if section.background %} {% if section.background %}
</div> </div>
{% endif %} {% endif %}

View File

@ -1,11 +1,9 @@
{% if section.background or section.color %} {% if section.background or section.color %}
<div class="bg-section" style="{% if section.background -%}background: {{ section.background }};{% endif %}{% if section.color -%}color: {{ section.color }};{% endif %}"> <div class="bg-section" style="{% if section.background -%}background: {{ section.background }};{% endif %}{% if section.color -%}color: {{ section.color }};{% endif %}">
{% endif %} {% endif %}
<section class="text"> <section class="text">
{{ section.text }} {{ section.text }}
</section> </section>
{% if section.background or section.color %} {% if section.background or section.color %}
</div> </div>
{% endif %} {% endif %}

View File

@ -1,9 +1,9 @@
{% set absolute_url = settings.url + "/" + link -%} {% set absolute_url = settings.url + "/" + link %}
<div class=share> <div class=share>
<h5>Share this story</h5> <h5>Share this story</h5>
<ul class="icon"> <ul class="icon">
<li> <li>
<a class="twitter" href="https://twitter.com/share?text={{ gallery.name }}&url={{absolute_url}}{%if gallery.tags %}&hashtags={% for tag in gallery.tags -%}{{ tag }}{% if not loop.lirst and not loop.last %},{% endif %}{% endfor -%}{% endif -%}" target="_blank">Twitter</a> <a class="twitter" href="https://twitter.com/share?text={{ gallery.name }}&url={{absolute_url}}{%if gallery.tags %}&hashtags={% for tag in gallery.tags %}{{ tag }}{% if not loop.lirst and not loop.last %},{% endif %}{% endfor %}{% endif %}" target="_blank">Twitter</a>
</li> </li>
<li> <li>
<a class="facebook" href="http://www.facebook.com/share.php?u={{absolute_url}}" target="_blank">Facebook</a> <a class="facebook" href="http://www.facebook.com/share.php?u={{absolute_url}}" target="_blank">Facebook</a>

View File

@ -5,19 +5,9 @@
<description>{{ settings.sub_title }}</description> <description>{{ settings.sub_title }}</description>
<link>{{ settings.url }}</link> <link>{{ settings.url }}</link>
<atom:link href="{{ settings.url }}/feed.xml" rel="self" type="application/rss+xml" /> <atom:link href="{{ settings.url }}/feed.xml" rel="self" type="application/rss+xml" />
{% for gallery in galleries %} {% for gallery in galleries %}
{% set absolute_url = settings.url + "/" + gallery.link %} {% set absolute_url = settings.url + "/" %}
<item> {% include "item.html" %}
<title>{{ gallery.title }}</title>
<link>{{ absolute_url }}</link>
<guid>{{ gallery.link }}</guid>
{% if gallery.sub_title %}
<description>{{ gallery.sub_title }}</description>
{% endif %}
<pubDate>{{ gallery.date }}</pubDate>
</item>
{% endfor %} {% endfor %}
</channel> </channel>
</rss> </rss>

View File

@ -13,6 +13,16 @@
<!--Let browser know website is optimized for mobile--> <!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
{% if gallery.description %}
<meta name="description" content="{{ gallery.description }}" />
{% endif %}
{% if gallery.lang %}
<meta name="language" content="{{ gallery.lang }}" />
{% endif %}
{% if settings.settings.og %}
{% include "opengraph.html" %}
{% endif %}
<title>{{ gallery.title }} · {{ settings.title }}</title> <title>{{ gallery.title }} · {{ settings.title }}</title>
</head> </head>

View File

@ -0,0 +1,15 @@
{% set absolute_url = absolute_url+ gallery.link+"/" %}
<item>
<title>{{ gallery.title }}</title>
<link>{{ absolute_url }}</link>
<guid>{{ gallery.link }}</guid>
{% if gallery.sub_title %}
<description>{{ gallery.sub_title }}</description>
{% endif -%}
<pubDate>{{ gallery.date }}</pubDate>
</item>
{% for sub_gallery in gallery.sub_gallery %}
{% with gallery=sub_gallery %}
{% include "item.html" %}
{% endwith %}
{% endfor %}

View File

@ -0,0 +1,16 @@
{% set absolute_url = settings.url + "/" + name + "/" %}
{% set cover = Image(gallery.cover) %}
{{ cover.copy() }}
<meta property="og:title" content="{{ gallery.title }}"/>
<meta property="og:image" content="{{ absolute_url }}{{ cover.generate_thumbnail("x900") }}"/>
<meta property="og:site_name" content="{{ settings.title }}"/>
{% if gallery.description %}
<meta property="og:description" content="{{ gallery.description }}"/>
{% endif %}
<meta property="og:type" content="article"/>
<meta property="article:published_time" content="{{ gallery.date }}">
{% if gallery.tags %}
{% for tag in gallery.tags %}
<meta property="article:tag" content="{{ tag }}">
{% endfor %}
{% endif %}

View File

@ -13,6 +13,16 @@
<!--Let browser know website is optimized for mobile--> <!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
{% if gallery.description %}
<meta name="description" content="{{ gallery.description }}" />
{% endif %}
{% if gallery.lang %}
<meta name="language" content="{{ gallery.lang }}" />
{% endif %}
{% if settings.settings.og %}
{% include "opengraph.html" %}
{% endif %}
<title>{{ gallery.title }} · {{ settings.title }}</title> <title>{{ gallery.title }} · {{ settings.title }}</title>
</head> </head>

View File

@ -0,0 +1,16 @@
{% set absolute_url = settings.url + "/" + name + "/" %}
{% set cover = Image(gallery.cover) %}
{{ cover.copy() }}
<meta property="og:title" content="{{ gallery.title }}"/>
<meta property="og:image" content="{{ absolute_url }}{{ cover.generate_thumbnail("x900") }}"/>
<meta property="og:site_name" content="{{ settings.title }}"/>
{% if gallery.description %}
<meta property="og:description" content="{{ gallery.description }}"/>
{% endif %}
<meta property="og:type" content="article"/>
<meta property="article:published_time" content="{{ gallery.date }}">
{% if gallery.tags %}
{% for tag in gallery.tags %}
<meta property="article:tag" content="{{ tag }}">
{% endfor %}
{% endif %}