diff --git a/components/open-graph.tpl b/components/open-graph.tpl new file mode 100644 index 0000000..ace7966 --- /dev/null +++ b/components/open-graph.tpl @@ -0,0 +1,37 @@ +{% comment %}https://developers.facebook.com/tools/debug - Debug after each modification{% endcomment %} +{% if site.data.fb_admin %}{% endif %} + + + + + +{% comment %}Open Graph image{% endcomment %} +{% if front_page == true %} + {% unless page.data.cover_image == '' %} + {% if page.data.cover_image == nil %} + + {% else %} + + {% endif %} + {% endunless %} +{% else %} + {% if article and article_cover_image != nil and article_cover_image != "" %} + + {% elsif article and article.data.fb_image %} + + {% elsif page.data.fb_image %} + + {% elsif site.data.fb_image %} + + {% endif %} +{% endif %} + +{% comment %}Open Graph description{% endcomment %} +{% if blog and article == nil and (page.description == nil or page.description == "") %} + {% assign excerpt_description = articles.first.excerpt | strip_html | escape | strip_newlines | truncatewords: 200, '...' %} + + +{% else %} + + +{% endif %} diff --git a/layouts/blog___news.tpl b/layouts/blog___news.tpl index 0cfdbb8..934517b 100755 --- a/layouts/blog___news.tpl +++ b/layouts/blog___news.tpl @@ -1,8 +1,8 @@ - {% include "html-head" %} {% include "edicy-tools-variables" %} + {% include "html-head" %} diff --git a/layouts/blog_article.tpl b/layouts/blog_article.tpl index f9f489b..79c8556 100755 --- a/layouts/blog_article.tpl +++ b/layouts/blog_article.tpl @@ -1,9 +1,9 @@ - {% include "html-head" %} {% include "edicy-tools-variables" %} {% include "edicy-tools-article-variables" %} + {% include "html-head" %} {{ site.stats_header }} diff --git a/layouts/common_page.tpl b/layouts/common_page.tpl index a26f8c5..f184834 100755 --- a/layouts/common_page.tpl +++ b/layouts/common_page.tpl @@ -1,8 +1,8 @@ - {% include "html-head" %} {% include "edicy-tools-variables" %} + {% include "html-head" %} diff --git a/layouts/front_page.tpl b/layouts/front_page.tpl index 88fb15d..effa098 100755 --- a/layouts/front_page.tpl +++ b/layouts/front_page.tpl @@ -1,8 +1,9 @@ - {% include "html-head" %} + {% assign front_page = true %} {% include "edicy-tools-variables" %} + {% include "html-head" %} diff --git a/manifest.json b/manifest.json index 9d1c19a..870e867 100644 --- a/manifest.json +++ b/manifest.json @@ -139,11 +139,18 @@ "title": "menu-mobile" }, { - "content_type": "blog", - "component": false, - "file": "layouts/blog___news.tpl", - "layout_name": "blog", - "title": "Blog & News" + "content_type": "component", + "component": true, + "file": "components/news.tpl", + "layout_name": "news", + "title": "news" + }, + { + "content_type": "component", + "component": true, + "file": "components/open-graph.tpl", + "layout_name": "open-graph", + "title": "open-graph" }, { "content_type": "component", @@ -198,7 +205,7 @@ "content_type": "component", "component": true, "file": "components/voog-ref.tpl", - "layout_name": "", + "layout_name": "voog-ref", "title": "voog-ref" } ],