0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/core/server/helpers
Aileen Nowak 2f3081fa9f Make AMP optional (#7830)
closes #7769

Because Google AMP is bitching around and shows errors in Googles' webmaster tools for missing post images and blog icons, we decided to make AMP optional. It will be enabled by default, but can be disabled in general settings. Once disabled, the `amp` route doesn't work anymore.

This PR contains the back end changes for Ghost-alpha:
- Adds `amp` to settings table incl default setting `true`
- Adds `amp` value to our settings cache
- Changes the route handling of AMP app to check for the `amp` setting first.
- Adds tests to check the route handling and ghost_head output
- Includes changes to `post-lookup.js` as done by @kirrg001 in #7842
2017-01-17 16:40:06 +01:00
..
tpl Subscribers: router & form helpers 2016-05-11 10:28:11 +02:00
asset.js 🎨 replace process.env.NODE_ENV usages by config.get('env') (#7544) 2016-10-11 13:53:52 +01:00
author.js 🎨 source out url utils from ConfigManager (#7347) 2016-09-20 15:59:34 +01:00
body_class.js 🔥 Remove the deprecated body classes (#7510) 2016-10-10 11:38:12 +02:00
content.js
date.js Use moment-timezone when using .tz() (#7653) 2016-10-31 14:44:24 +01:00
encode.js Rename confusing 'context' variables 2016-02-21 22:07:15 +00:00
excerpt.js Rename confusing 'context' variables 2016-02-21 22:07:15 +00:00
facebook_url.js Add helpers for facebook & twitter urls 2016-05-17 16:39:58 +01:00
foreach.js Move internal tags out of labs (#7519) 2016-10-10 09:51:03 +01:00
get.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
ghost_foot.js Remove auto-inclusion of jQuery via ghost_foot 2015-09-02 13:39:22 +01:00
ghost_head.js Make AMP optional (#7830) 2017-01-17 16:40:06 +01:00
has.js 🎨 configurable logging with bunyan (#7431) 2016-10-04 16:33:43 +01:00
image.js 🎨 source out url utils from ConfigManager (#7347) 2016-09-20 15:59:34 +01:00
index.js 🎉 🎨 Remove middleware/index.js (#7548) 2016-10-13 17:24:09 +02:00
is.js 🎨 configurable logging with bunyan (#7431) 2016-10-04 16:33:43 +01:00
meta_description.js Started moving meta data fetching to functions. 2016-01-23 13:58:21 -08:00
meta_title.js Started moving meta data fetching to functions. 2016-01-23 13:58:21 -08:00
navigation.js urlencode navigation URLs rather than HTML escape (#7836) 2017-01-17 15:55:19 +01:00
page_url.js 🔥 Remove deprecated pageUrl helper (#7509) 2016-10-06 20:47:37 +02:00
pagination.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
plural.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
post_class.js Remove filters from theme helpers (no async) 2015-12-08 14:35:04 +00:00
prev_next.js Rename confusing 'context' variables 2016-02-21 22:07:15 +00:00
tags.js Move internal tags out of labs (#7519) 2016-10-10 09:51:03 +01:00
template.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
title.js
twitter_url.js Add helpers for facebook & twitter urls 2016-05-17 16:39:58 +01:00
url.js urlencode navigation URLs rather than HTML escape (#7836) 2017-01-17 15:55:19 +01:00
utils.js 🎨 replace process.env.NODE_ENV usages by config.get('env') (#7544) 2016-10-11 13:53:52 +01:00