Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡❓ Make AMP optional #7830

Merged
merged 1 commit into from
Jan 17, 2017
Merged

Conversation

aileen
Copy link
Member

@aileen aileen commented Jan 9, 2017

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 ✨ make AMP optional #7842

@kirrg001 kirrg001 self-assigned this Jan 9, 2017
@kirrg001 kirrg001 changed the title ⚡❓ Make AMP optional [WIP] ⚡❓ Make AMP optional Jan 12, 2017
closes TryGhost#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 TryGhost#7842
@aileen aileen changed the title [WIP] ⚡❓ Make AMP optional ⚡❓ Make AMP optional Jan 17, 2017
@@ -12,7 +14,7 @@ var path = require('path'),
function controller(req, res, next) {
var defaultView = path.resolve(__dirname, 'views', 'amp.hbs'),
paths = templates.getActiveThemePaths(req.app.get('activeTheme')),
data = req.amp;
data = req.body || {};

This comment was marked as abuse.

This comment was marked as abuse.

@kirrg001 kirrg001 merged commit 2f3081f into TryGhost:master Jan 17, 2017
@aileen aileen deleted the amp-optional-alpha branch October 13, 2017 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AMP should be opt-in
2 participants