mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
jQuery link and min map 404 fixes
fixes #1652 - removes the min map thing which doesn't work properly #551, #766, #1479
This commit is contained in:
parent
94ce669d37
commit
38e781c8da
4 changed files with 13 additions and 10 deletions
|
@ -11,7 +11,7 @@ var _ = require('underscore'),
|
|||
filters = require('../filters'),
|
||||
packageInfo = require('../../../package.json'),
|
||||
version = packageInfo.version,
|
||||
scriptTemplate = _.template("<script src='<%= source %>?v=<%= version %>'></script>"),
|
||||
scriptTemplate = _.template('<script src="<%= source %>?v=<%= version %>"></script>'),
|
||||
isProduction = process.env.NODE_ENV === 'production',
|
||||
api = require('../api'),
|
||||
config = require('../config'),
|
||||
|
@ -354,7 +354,7 @@ coreHelpers.post_class = function (options) {
|
|||
coreHelpers.ghost_head = function (options) {
|
||||
/*jslint unparam:true*/
|
||||
var blog = config.theme(),
|
||||
root = config.paths().webroot,
|
||||
webroot = config.paths().webroot,
|
||||
head = [],
|
||||
majorMinor = /^(\d+\.)?(\d+)/,
|
||||
trimmedVersion = this.version;
|
||||
|
@ -363,7 +363,7 @@ coreHelpers.ghost_head = function (options) {
|
|||
|
||||
head.push('<meta name="generator" content="Ghost ' + trimmedVersion + '" />');
|
||||
|
||||
head.push('<link rel="alternate" type="application/rss+xml" title="' + _.escape(blog.title) + '" href="' + root + '/rss/' + '">');
|
||||
head.push('<link rel="alternate" type="application/rss+xml" title="' + _.escape(blog.title) + '" href="' + webroot + '/rss/' + '">');
|
||||
if (this.ghostRoot) {
|
||||
head.push('<link rel="canonical" href="' + config().url + this.ghostRoot + '" />');
|
||||
}
|
||||
|
@ -376,8 +376,13 @@ coreHelpers.ghost_head = function (options) {
|
|||
|
||||
coreHelpers.ghost_foot = function (options) {
|
||||
/*jslint unparam:true*/
|
||||
var foot = [];
|
||||
foot.push('<script src="' + config().url + '/shared/vendor/jquery/jquery.js"></script>');
|
||||
var foot = [],
|
||||
webroot = config.paths().webroot;
|
||||
|
||||
foot.push(scriptTemplate({
|
||||
source: (webroot === '/' ? '' : webroot) + '/shared/vendor/jquery/jquery.js',
|
||||
version: this.version
|
||||
}));
|
||||
|
||||
return filters.doFilter('ghost_foot', foot).then(function (foot) {
|
||||
var footString = _.reduce(foot, function (memo, item) { return memo + ' ' + item; }, '');
|
||||
|
|
1
core/shared/vendor/jquery/jquery.js
vendored
1
core/shared/vendor/jquery/jquery.js
vendored
File diff suppressed because one or more lines are too long
1
core/shared/vendor/jquery/jquery.min.map
vendored
1
core/shared/vendor/jquery/jquery.min.map
vendored
File diff suppressed because one or more lines are too long
|
@ -304,9 +304,9 @@ describe('Core Helpers', function () {
|
|||
});
|
||||
|
||||
it('returns meta tag string', function (done) {
|
||||
helpers.ghost_foot.call().then(function (rendered) {
|
||||
helpers.ghost_foot.call({version: "0.9"}).then(function (rendered) {
|
||||
should.exist(rendered);
|
||||
rendered.string.should.match(/<script src=".*\/shared\/vendor\/jquery\/jquery.js"><\/script>/);
|
||||
rendered.string.should.match(/<script src=".*\/shared\/vendor\/jquery\/jquery.js\?v=0.9"><\/script>/);
|
||||
|
||||
done();
|
||||
}).then(null, done);
|
||||
|
|
Loading…
Add table
Reference in a new issue