+ Meta, OG, Schema
This commit is contained in:
1 parent
d016b5e6f9
commit
5377807daa
2 files changed
+55
-12
No files matched your search
+9
-1
@@ -63,8 +63,16 @@ module.exports = function () {
|
||||
const source = await readFile(config.viewMain, 'utf-8')
|
||||
const template = handlebars.compile(source)
|
||||
|
||||
const title = page.title
|
||||
const meta = {
|
||||
title,
|
||||
description: title,
|
||||
image: 'https://art.shlisselburg.org/entrance.jpg',
|
||||
url: `https://art.shlisselburg.org${path}`,
|
||||
}
|
||||
|
||||
ctx.type = 'text/html'
|
||||
ctx.body = template({content})
|
||||
ctx.body = template({content, title, meta})
|
||||
} else {
|
||||
ctx.status = 404
|
||||
}
|
||||
|
||||
+46
-11
@@ -1,6 +1,38 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- COMMON TAGS -->
|
||||
<meta charset="utf-8">
|
||||
<title>{{title}}</title>
|
||||
|
||||
<!-- Search Engine -->
|
||||
<meta name="description" content="{{meta.description}}">
|
||||
<meta name="image" content="{{meta.image}}">
|
||||
|
||||
<!-- Schema.org for Google -->
|
||||
<meta itemprop="name" content="{{meta.title}}">
|
||||
<meta itemprop="description" content="{{meta.description}}">
|
||||
<meta itemprop="image" content="{{meta.image}}">
|
||||
|
||||
<!-- Open Graph general (Facebook, Pinterest & Google+) -->
|
||||
<meta name="og:title" content="{{meta.title}}">
|
||||
<meta name="og:description" content="{{meta.description}}">
|
||||
<meta name="og:image" content="{{meta.image}}">
|
||||
<meta name="og:url" content="{{meta.url}}">
|
||||
<meta name="og:site_name" content="Шлиссельбургская Детская Художественная Школа">
|
||||
<meta name="og:locale" content="ru_RU">
|
||||
<meta name="og:type" content="website">
|
||||
|
||||
<!-- Twitter -->
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="{{meta.title}}">
|
||||
<meta name="twitter:description" content="{{meta.description}}">
|
||||
<meta name="twitter:image:src" content="{{meta.image}}">
|
||||
<meta name="twitter:url" content="{{meta.url}}">
|
||||
<meta name="twitter:domain" content="art.shlisselburg.org">
|
||||
<meta name="twitter:site" content="@">
|
||||
<meta name="twitter:creator" content="@tmshv">
|
||||
|
||||
<meta name="google-site-verification" content="8BxOTw-Q02DS2KAdcGcnIMwiPZ58DVB18XpOfRibCcg">
|
||||
<meta name="google-site-verification" content="A-TEemUw4hHpULUDCd6xhxfHnyRbgKtss90JGKXnSpw"/>
|
||||
<meta name='yandex-verification' content='643c7dac144b9dac'/>
|
||||
@@ -23,19 +55,22 @@
|
||||
|
||||
<script>
|
||||
if (window.location.host.indexOf('localhost') === -1) {
|
||||
(function (i, s, o, g, r, a, m) {
|
||||
i['GoogleAnalyticsObject'] = r;
|
||||
i[r] = i[r] || function () {
|
||||
(i[r].q = i[r].q || []).push(arguments)
|
||||
}, i[r].l = 1 * new Date();
|
||||
a = s.createElement(o),
|
||||
m = s.getElementsByTagName(o)[0];
|
||||
a.async = 1;
|
||||
a.src = g;
|
||||
m.parentNode.insertBefore(a, m)
|
||||
(function (window, document, script, src, ga, element, m) {
|
||||
window['GoogleAnalyticsObject'] = ga;
|
||||
if (!window[ga]) {
|
||||
window[ga] = function () {
|
||||
(window[ga].q = window[ga].q || []).push(arguments)
|
||||
}
|
||||
}
|
||||
window[ga].l = 1 * new Date();
|
||||
element = document.createElement(script);
|
||||
m = document.getElementsByTagName(script)[0];
|
||||
element.async = 1;
|
||||
element.src = src;
|
||||
m.parentNode.insertBefore(element, m)
|
||||
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
||||
|
||||
// ga('create', 'UA-60209057-1', 'auto');
|
||||
ga('create', 'UA-60209057-1', 'auto');
|
||||
//ga('send', 'pageview');
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user