Skip to content

Commit

Permalink
Adds meta referrer tag to the head of ghost pages
Browse files Browse the repository at this point in the history
closes #5522
- Added meta tag
- Added meta tag to tests
  • Loading branch information
John O'Mahoney committed Jul 8, 2015
1 parent 9114889 commit ac80569
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/server/helpers/ghost_head.js
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions core/test/unit/server_helpers/ghost_head_spec.js
Expand Up @@ -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" \/>/);
Expand Down

0 comments on commit ac80569

Please sign in to comment.