Skip to content

Instantly share code, notes, and snippets.

@intrd
Last active July 4, 2017 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save intrd/cc2a3db30bfd517e509b031508aa3fdf to your computer and use it in GitHub Desktop.
Save intrd/cc2a3db30bfd517e509b031508aa3fdf to your computer and use it in GitHub Desktop.
Ghost blogs - fast tip to disable Google AMP

Google AMP is shit! we don't need this fucking our layouts..

Go to /core/server/config/index.js

        internalApps: ['private-blogging', 'subscribers', 'amp'],
        slugs: {
            // Used by generateSlug to generate slugs for posts, tags, users, ..
            // reserved slugs are reserved but can be extended/removed by apps
            // protected slugs cannot be changed or removed
            reserved: ['admin', 'app', 'apps', 'archive', 'archives', 'categories',
            'category', 'dashboard', 'feed', 'ghost-admin', 'login', 'logout',
            'page', 'pages', 'post', 'posts', 'public', 'register', 'setup',
            'signin', 'signout', 'signup', 'user', 'users', 'wp-admin', 'wp-login'],
            protected: ['ghost', 'rss', 'amp']
        },

.. and remove the amp from protected and internalApps array.

       internalApps: ['private-blogging', 'subscribers'],
       slugs: {
           // Used by generateSlug to generate slugs for posts, tags, users, ..
           // reserved slugs are reserved but can be extended/removed by apps
           // protected slugs cannot be changed or removed
           reserved: ['admin', 'app', 'apps', 'archive', 'archives', 'categories',
           'category', 'dashboard', 'feed', 'ghost-admin', 'login', 'logout',
           'page', 'pages', 'post', 'posts', 'public', 'register', 'setup',
           'signin', 'signout', 'signup', 'user', 'users', 'wp-admin', 'wp-login'],
           protected: ['ghost', 'rss']
       },

Done! No more AMP shit at your blog..

PS: Ghost devs are working to create a Opt-in function to disable this from control panel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment