0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Merge pull request #5529 from jomahoney/referrer

Adds referrer meta tag to the head of ghost pages
This commit is contained in:
Hannah Wolfe 2015-07-08 22:18:47 +01:00
commit 3c5011cd56
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" \/>/);