Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Add v3.22.0
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickRe committed Jul 1, 2020
1 parent 240349e commit 59a5fdc
Show file tree
Hide file tree
Showing 85 changed files with 2,833 additions and 1,715 deletions.
Empty file.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion core/frontend/apps/private-blogging/lib/views/private.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes" />

<link rel="shortcut icon" href="{{asset "favicon.ico"}}">
<meta http-equiv="cleartype" content="on">

<link rel="stylesheet" href="{{asset "public/ghost.css" hasMinFile="true"}}"/>
Expand Down
18 changes: 9 additions & 9 deletions core/frontend/helpers/ghost_head.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,15 @@ function finaliseStructuredData(metaData) {
}

function getMembersHelper() {
const stripePaymentProcessor = settingsCache.get('members_subscription_settings').paymentProcessors.find(
paymentProcessor => paymentProcessor.adapter === 'stripe'
);
const stripeSecretToken = stripePaymentProcessor.config.secret_token;
const stripePublicToken = stripePaymentProcessor.config.public_token;

const stripeConnectIntegration = settingsCache.get('stripe_connect_integration');
const stripeDirectSecretKey = settingsCache.get('stripe_secret_key');
const stripeDirectPublishableKey = settingsCache.get('stripe_publishable_key');
const stripeConnectAccountId = settingsCache.get('stripe_connect_account_id');

let membersHelper = `<script defer src="${getAssetUrl('public/members.js', true)}"></script>`;
if (config.get('enableDeveloperExperiments')) {
membersHelper += `<script defer src="https://unpkg.com/@tryghost/members-js@latest/umd/members.min.js" data-ghost="${urlUtils.getSiteUrl()}"></script>`;
}
if ((!!stripeSecretToken && !!stripePublicToken) || !!stripeConnectIntegration.account_id) {
if ((!!stripeDirectSecretKey && !!stripeDirectPublishableKey) || !!stripeConnectAccountId) {
membersHelper += '<script src="https://js.stripe.com/v3/"></script>';
}
return membersHelper;
Expand Down Expand Up @@ -129,8 +125,12 @@ module.exports = function ghost_head(options) { // eslint-disable-line camelcase
if (metaData.metaDescription && metaData.metaDescription.length > 0) {
head.push('<meta name="description" content="' + escapeExpression(metaData.metaDescription) + '" />');
}

// no output in head if a publication icon is not set
if (settingsCache.get('icon')) {
head.push('<link rel="icon" href="' + favicon + '" type="image/' + iconType + '" />');
}

head.push('<link rel="shortcut icon" href="' + favicon + '" type="image/' + iconType + '" />');
head.push('<link rel="canonical" href="' +
escapeExpression(metaData.canonicalUrl) + '" />');
head.push('<meta name="referrer" content="' + referrerPolicy + '" />');
Expand Down
2 changes: 1 addition & 1 deletion core/frontend/meta/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function getMetaData(data, root) {
url: urlUtils.urlFor('home', true),
facebook: settingsCache.get('facebook'),
twitter: settingsCache.get('twitter'),
timezone: settingsCache.get('active_timezone'),
timezone: settingsCache.get('timezone'),
navigation: settingsCache.get('navigation'),
icon: settingsCache.get('icon'),
cover_image: settingsCache.get('cover_image'),
Expand Down
4 changes: 2 additions & 2 deletions core/frontend/services/routing/CollectionRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class CollectionRouter extends ParentRouter {
* e.g. /:year/:month/:day/:slug/ or /:day/:slug/
*/
this._onTimezoneEditedListener = this._onTimezoneEdited.bind(this);
events.on('settings.active_timezone.edited', this._onTimezoneEditedListener);
events.on('settings.timezone.edited', this._onTimezoneEditedListener);
}

/**
Expand Down Expand Up @@ -197,7 +197,7 @@ class CollectionRouter extends ParentRouter {

reset() {
if (this._onTimezoneEditedListener) {
events.removeListener('settings.active_timezone.edited', this._onTimezoneEditedListener);
events.removeListener('settings.timezone.edited', this._onTimezoneEditedListener);
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions core/frontend/services/routing/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,6 @@ module.exports.start = (apiVersion) => {
registry.setRouter(staticRoutesRouter.identifier, staticRoutesRouter);
});

_.each(dynamicRoutes.taxonomies, (value, key) => {
const taxonomyRouter = new TaxonomyRouter(key, value, RESOURCE_CONFIG);
siteRouter.mountRouter(taxonomyRouter.router());

registry.setRouter(taxonomyRouter.identifier, taxonomyRouter);
});

_.each(dynamicRoutes.collections, (value, key) => {
const collectionRouter = new CollectionRouter(key, value, RESOURCE_CONFIG);
siteRouter.mountRouter(collectionRouter.router());
Expand All @@ -99,6 +92,13 @@ module.exports.start = (apiVersion) => {

registry.setRouter('staticPagesRouter', staticPagesRouter);

_.each(dynamicRoutes.taxonomies, (value, key) => {
const taxonomyRouter = new TaxonomyRouter(key, value, RESOURCE_CONFIG);
siteRouter.mountRouter(taxonomyRouter.router());

registry.setRouter(taxonomyRouter.identifier, taxonomyRouter);
});

const appRouter = new ParentRouter('AppsRouter');
siteRouter.mountRouter(appRouter.router());

Expand Down
Loading

0 comments on commit 59a5fdc

Please sign in to comment.