add seo tags

This commit is contained in:
b1ek 2023-03-01 15:50:52 +10:00
parent 02979e161a
commit ecff523926
Signed by: blek
GPG Key ID: 14546221E3595D0C
4 changed files with 24 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -19,7 +19,13 @@ async function handler(req, res) {
{ {
current_route: '/', current_route: '/',
gb_entries, gb_entries,
articles articles,
og: {
title: 'blek! Site',
type: 'website',
image: req.protocol + '://' + req.get('host') + '/content/transylveonia.jpg',
url: req.protocol + '://' + req.get('host') + req.originalUrl
}
} }
) )
); );

View File

@ -13,12 +13,24 @@ block root
} }
doctype html doctype html
html(style='overflow-y:auto') html(style='overflow-y:auto' lang='en_US')
head head
title blek! Site #{title ? "- " + title : ""} title blek! Site #{title ? "- " + title : ""}
link(rel='stylesheet' href='/static/main.css') link(rel='stylesheet' href='/static/main.css')
//- basic SEO tags
if (typeof description == 'string')
meta(name='description' content=description)
//- Open Graph tags
if (typeof og == 'object')
each content, tag in og
meta(property='og:' + tag content=content)
//- UX
meta(name='viewport' content='width=device-width, initial-scale=1')
block head block head
body(style='overflow-y:auto') body(style='overflow-y:auto')
table(width='100%' height='100%' class='body_table') table(width='100%' height='100%' class='body_table')
@ -47,15 +59,15 @@ html(style='overflow-y:auto')
block content block content
block foot block foot
// js dependencies //- js dependencies
script(src='/static/js/jquery.js') script(src='/static/js/jquery.js')
// global js //- global js
script(src='/static/js/main.js') script(src='/static/js/main.js')
script(type='text/javascript'). script(type='text/javascript').
setTimeout(function() { setTimeout(function() {
alert('Congratulations! You have spent 10 years on this page. Go fuck yourself.\n\nUwU'); alert('Congratulations! You have spent 10 years on this page. Go fuck yourself.\n\nUwU');
}, 1000 * 60 * 60 * 24 * 365 * 10); }, 1000 * 60 * 60 * 24 * 365 * 10);
// page js //- page js
block scripts block scripts