0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Adds meta referrer tag to the head of ghost pages

closes #5522
- Added meta tag
- Added meta tag to tests
This commit is contained in:
John O'Mahoney 2015-07-07 18:45:13 +01:00
parent 9114889fd6
commit ac80569c31
2 changed files with 2 additions and 0 deletions

View file

@ -290,6 +290,7 @@ ghost_head = function (options) {
// head is our main array that holds our meta data
head.push('<link rel="canonical" href="' + metaData.url + '" />');
head.push('<meta name="referrer" content="origin" />');
// Generate context driven pagination urls
if (self.pagination) {

View file

@ -76,6 +76,7 @@ describe('{{ghost_head}} helper', function () {
).then(function (rendered) {
should.exist(rendered);
rendered.string.should.match(/<link rel="canonical" href="http:\/\/testurl.com\/" \/>/);
rendered.string.should.match(/<meta name="referrer" content="origin" \/>/);
rendered.string.should.match(/<meta property="og:site_name" content="Ghost" \/>/);
rendered.string.should.match(/<meta property="og:type" content="website" \/>/);
rendered.string.should.match(/<meta property="og:title" content="Ghost" \/>/);