Skip to content

Commit

Permalink
Add v4.26.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RadoslavGatev committed Dec 6, 2021
1 parent 013e504 commit 86c25ed
Show file tree
Hide file tree
Showing 29 changed files with 581 additions and 215 deletions.
2 changes: 1 addition & 1 deletion content/themes/casper/assets/built/screen.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/themes/casper/assets/built/screen.css.map

Large diffs are not rendered by default.

31 changes: 25 additions & 6 deletions content/themes/casper/assets/css/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -995,27 +995,46 @@ is the very first element in the post content */
}

/* Now the content typography styles */
.gh-content a:not(.gh-post-upgrade-cta a):not(.kg-bookmark-container):not(.kg-btn):not(.kg-nft-card-container) {
.gh-content a:not(.gh-post-upgrade-cta a):not(.kg-bookmark-container):not(.kg-btn):not(.kg-nft-card-container):not(.kg-callout-card-accent a) {
color: var(--ghost-accent-color);
text-decoration: underline;
word-break: break-word;
}

.gh-content .kg-callout-card-accent a {
text-decoration: underline;
}

.gh-content > blockquote,
.gh-content > ol,
.gh-content > ul,
.gh-content > dl,
.gh-content > p,
.kg-callout-text,
.kg-toggle-content > ol,
.kg-toggle-content > ul,
.kg-toggle-content > p {
.gh-content > p {
font-family: var(--font-serif);
font-weight: 400;
font-size: 2.1rem;
line-height: 1.6em;
}

.gh-content .kg-callout-text,
.gh-content .kg-toggle-content > ol,
.gh-content .kg-toggle-content > ul,
.gh-content .kg-toggle-content > p {
font-family: var(--font-serif);
font-weight: 400;
font-size: 2.0rem;
line-height: 1.6em;
}

.gh-content .kg-callout-emoji {
font-size: 2.2rem;
line-height: 1.5em;
}

.gh-content .kg-toggle-heading-text {
font-size: 2.2rem;
}

.has-sans-body .gh-content > blockquote,
.has-sans-body .gh-content > ol,
.has-sans-body .gh-content > ul,
Expand Down
2 changes: 1 addition & 1 deletion content/themes/casper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "casper",
"description": "A clean, minimal default theme for the Ghost publishing platform",
"demo": "https://demo.ghost.io",
"version": "4.3.0",
"version": "4.3.1",
"engines": {
"ghost": ">=4.0.0",
"ghost-api": "v4"
Expand Down
12 changes: 8 additions & 4 deletions core/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ const maintenanceMiddleware = (req, res, next) => {
fs.createReadStream(path.resolve(__dirname, './server/views/maintenance.html')).pipe(res);
};

const rootApp = express('root');
rootApp.use(sentry.requestHandler);
const rootApp = () => {
const app = express('root');
app.use(sentry.requestHandler);

rootApp.enable('maintenance');
rootApp.use(maintenanceMiddleware);
app.enable('maintenance');
app.use(maintenanceMiddleware);

return app;
};

module.exports = rootApp;
73 changes: 50 additions & 23 deletions core/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,19 @@ async function initCore({ghostServer, config, bootLogger, frontend}) {
});
debug('End: Url Service');

// Job Service allows parts of Ghost to run in the background
debug('Begin: Job Service');
const jobService = require('./server/services/jobs');
ghostServer.registerCleanupTask(async () => {
await jobService.shutdown();
});
ghostServer.registerCleanupTask(async () => {
await urlService.shutdown();
});
debug('End: Job Service');
if (ghostServer) {
// Job Service allows parts of Ghost to run in the background
debug('Begin: Job Service');
const jobService = require('./server/services/jobs');
ghostServer.registerCleanupTask(async () => {
await jobService.shutdown();
});
debug('End: Job Service');

ghostServer.registerCleanupTask(async () => {
await urlService.shutdown();
});
}

debug('End: initCore');
}
Expand Down Expand Up @@ -166,10 +169,27 @@ async function initFrontend() {
* @param {Object} options
* @param {Boolean} options.backend
* @param {Boolean} options.frontend
* @param {Object} options.config
*/
async function initExpressApps(options) {
async function initExpressApps({frontend, backend, config}) {
debug('Begin: initExpressApps');
const parentApp = require('./server/web/parent/app')(options);

const parentApp = require('./server/web/parent/app')();
const vhost = require('@tryghost/vhost-middleware');

// Mount the express apps on the parentApp
if (backend) {
// ADMIN + API
const backendApp = require('./server/web/parent/backend')();
parentApp.use(vhost(config.getBackendMountPath(), backendApp));
}

if (frontend) {
// SITE + MEMBERS
const frontendApp = require('./server/web/parent/frontend')({});
parentApp.use(vhost(config.getFrontendMountPath(), frontendApp));
}

debug('End: initExpressApps');
return parentApp;
}
Expand Down Expand Up @@ -303,7 +323,7 @@ async function initBackgroundServices({config}) {
* @returns {Promise<object>} ghostServer
*/
async function bootGhost({backend = true, frontend = true} = {}) {
async function bootGhost({backend = true, frontend = true, server = true} = {}) {
// Metrics
const startTime = Date.now();
debug('Begin Boot');
Expand Down Expand Up @@ -351,13 +371,15 @@ async function bootGhost({backend = true, frontend = true} = {}) {

// Step 2 - Start server with minimal app in global maintenance mode
debug('Begin: load server + minimal app');
const rootApp = require('./app');

const GhostServer = require('./server/ghost-server');
ghostServer = new GhostServer({url: config.getSiteUrl()});
await ghostServer.start(rootApp);
bootLogger.log('server started');
debug('End: load server + minimal app');
const rootApp = require('./app')();

if (server) {
const GhostServer = require('./server/ghost-server');
ghostServer = new GhostServer({url: config.getSiteUrl()});
await ghostServer.start(rootApp);
bootLogger.log('server started');
debug('End: load server + minimal app');
}

// Step 3 - Get the DB ready
debug('Begin: Get DB ready');
Expand All @@ -373,7 +395,7 @@ async function bootGhost({backend = true, frontend = true} = {}) {
if (frontend) {
await initFrontend();
}
const ghostApp = await initExpressApps({frontend, backend});
const ghostApp = await initExpressApps({frontend, backend, config});

if (frontend) {
await initDynamicRouting();
Expand All @@ -397,8 +419,13 @@ async function bootGhost({backend = true, frontend = true} = {}) {
initBackgroundServices({config});

// We return the server purely for testing purposes
debug('End Boot: Returning Ghost Server');
return ghostServer;
if (server) {
debug('End Boot: Returning Ghost Server');
return ghostServer;
} else {
debug('End boot: Returning Root App');
return rootApp;
}
} catch (error) {
const errors = require('@tryghost/errors');

Expand Down

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.

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

11 changes: 8 additions & 3 deletions core/frontend/apps/amp/lib/views/amp.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,12 @@
}
.post-content blockquote.kg-blockquote-alt {
font-size: 2rem;
line-height: 1.7;
font-size: 1.2em;
font-style: italic;
line-height: 1.6em;
text-align: center;
color: #738a94;
padding: 1rem 6rem 1.5rem;
padding: 0.75em 3em 1.25em;
}
.post-content blockquote.kg-blockquote-alt::before {
Expand Down Expand Up @@ -625,6 +626,10 @@
color: #fff;
}
.kg-callout-card-accent a {
color: #fff;
}
.kg-callout-emoji {
padding-right: 16px;
line-height: 1.3;
Expand Down
Loading

0 comments on commit 86c25ed

Please sign in to comment.