mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Merge pull request #5529 from jomahoney/referrer
Adds referrer meta tag to the head of ghost pages
This commit is contained in:
commit
3c5011cd56
2 changed files with 2 additions and 0 deletions
|
@ -290,6 +290,7 @@ ghost_head = function (options) {
|
||||||
|
|
||||||
// head is our main array that holds our meta data
|
// head is our main array that holds our meta data
|
||||||
head.push('<link rel="canonical" href="' + metaData.url + '" />');
|
head.push('<link rel="canonical" href="' + metaData.url + '" />');
|
||||||
|
head.push('<meta name="referrer" content="origin" />');
|
||||||
|
|
||||||
// Generate context driven pagination urls
|
// Generate context driven pagination urls
|
||||||
if (self.pagination) {
|
if (self.pagination) {
|
||||||
|
|
|
@ -76,6 +76,7 @@ describe('{{ghost_head}} helper', function () {
|
||||||
).then(function (rendered) {
|
).then(function (rendered) {
|
||||||
should.exist(rendered);
|
should.exist(rendered);
|
||||||
rendered.string.should.match(/<link rel="canonical" href="http:\/\/testurl.com\/" \/>/);
|
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:site_name" content="Ghost" \/>/);
|
||||||
rendered.string.should.match(/<meta property="og:type" content="website" \/>/);
|
rendered.string.should.match(/<meta property="og:type" content="website" \/>/);
|
||||||
rendered.string.should.match(/<meta property="og:title" content="Ghost" \/>/);
|
rendered.string.should.match(/<meta property="og:title" content="Ghost" \/>/);
|
||||||
|
|
Loading…
Add table
Reference in a new issue