Opengraph

parent 6c574bd2
Pipeline #621 passed with stage
in 26 seconds
......@@ -83,7 +83,7 @@ module.exports = function(obj) {
if(firstpage === undefined) firstpage = tagPage;
lastpage = tagPage;
tagPage.file = file+'/'+p;
tagPage.file = file+'/'+p+'/';
tagPage.type = 'tag';
tagPage.tag = tag;
tagPage.subtags = subtags;
......@@ -92,6 +92,7 @@ module.exports = function(obj) {
tagPage.metadata.prevurl = prevurl;
tagPage.metadata.thispage = tagPage;
tagPage.metadata.pagenumber = p;
tagPage.canonicalURL = 'https://ok1kvk.cz/'+tagPage.file
tagPage.content = [];
if(prevpage !== undefined)
......
......@@ -3,7 +3,7 @@
*/
var rewriteURL = function(file) {
file = file.replace(/\.md$/,'');
file = file.replace(/\.md$/,'/');
file = file.replace(/^articles/,'clanek');
return file;
}
......@@ -13,6 +13,7 @@ module.exports = function(obj) {
return new Promise(function(resolve, reject) {
obj.pages.forEach(function(page) {
page.file = rewriteURL(page.file);
page.canonicalURL = 'https://ok1kvk.cz/'+page.file
})
resolve(obj)
});
......
{% extends "partials/base.html.nunj" %}
{% block head %}
<meta property="og:type" content="article" />
<meta property="article:published_time" content="{{ metadata.date.creation }}" />
<meta property="og:image" content="{{ metadata.image }}" />
<meta property="og:description" content="{% if metadata.perex %}{{metadata.perex}}{% else %}{% if metadata.perex_e %}{{metadata.perex_e | truncate}}{% else %}{% if content %}{{ content | striptags | truncate }}{% endif %}{% endif %}{% endif %}" />
{{ super() }}
{{ metadata.headerextra | safe }}
<script type="text/x-mathjax-config">
......
......@@ -6,6 +6,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
<title>{% if metadata.title %}{{ metadata.title }}{%else%}Radioklub OK1KVK{%endif%}</title>
<link rel="canonical" href="{{ canonicalURL }}" />
<link rel="publisher" href="https://plus.google.com/+ok1kvk/"/>
<meta property="og:title" content="{% if metadata.title %}{{ metadata.title }}{%else%}Radioklub OK1KVK{%endif%}" />
<meta property="og:locale" content="cs_CZ" />
<meta property="og:url" content="{{ canonicalURL }}" />
<meta property="og:site_name" content="ok1kvk.cz" />
<link href='https://fonts.googleapis.com/css?family=Roboto&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
<link href="{{ config.baseurl }}/theme/style.css?v=2" type="text/css" rel="stylesheet" media="screen,projection"/>
<link href="{{ config.baseurl }}/theme/highlight.css" type="text/css" rel="stylesheet" media="screen,projection"/>
......
{% extends "partials/base.html.nunj" %}
{% block head %}
{{ super() }}
<meta property="og:type" content="website" />
{% endblock %}
{% block content %}
{% include "partials/list.html.nunj" %}
{% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment