Git Product home page Git Product logo

amp-wp's People

Contributors

allancole avatar amedina avatar barklund avatar bartoszgadomski avatar bcampeau avatar davidcramer avatar delawski avatar delputnam avatar dependabot-preview[bot] avatar dependabot[bot] avatar dhaval-parekh avatar felixarntz avatar jacobschweitzer avatar johnwatkins0 avatar kaitnyl avatar kienstra avatar miina avatar mikeschinkel avatar mjangda avatar naveen17797 avatar pdclark avatar pierlon avatar renovate-bot avatar rutviksavsani avatar schlessera avatar spacedmonkey avatar swissspidy avatar thelovekesh avatar thierrya avatar westonruter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amp-wp's Issues

Add WPCOM Stats Pixel

For WPCOM + Jetpack: we should output a stats pixel to bump appropriate stats when an AMP page is viewed.

Easier Templating

We should make it easier to swap in your own template to allow for customization of styles, layout, header/footer, etc.

Feature Request: AMP Link Toggle for Smartphone Visitors

So when it's toggled on all your AMP-enabled content links redirects to the AMP version of the content if the visitor is on a smartphone, but the links remain the same for non-smartphone users. This way visitors can take advantage of the speed increases even though they didn't access your content through Google's new AMP-powered carousel. If it's toggled off (default), then all your links point to the original content, even for smartphone visitors.

YouTube Videos not working

Iframes and links from youtube are not working in my amp post. Showing this console error
"Expected width to be available and be an integer/length value: null"
"Blocked script execution in 'youtube link' because the document's frame is sandboxed and the 'allow-scripts' permission is not set"

Use default filter content

Why don't we just use the default content filter from WordPress core instead of using remove filters?

Handle missing width and height attributes for images

Not all <img> tags have width/height attributes which are required for the matching <amp-img> tag. We should find a way to include that somehow.

  • If srcset or sizes are included, try to pull from them, if possible.
  • Pull from attachment metadata.
  • Fetch the remote image and calculate/save the size (getimagesize and wpcom's getimagesize).

Related #13

Missing .editorconfig file

Maybe you should consider the option to add a .editorconfig, that should be helpful for somebody else to stick to the same standard you are using for this project and *.php files.

Thank you ! โœ‹

Initial feedback - many things not working (possible JetPack issue)

Just tried the plugin on http://www.get-business-online.com/ and saw the following:

  1. Static front page is not handled properly. When adding "amp/" to my home page, you get a 404
  2. When adding ?amp=1 to the home page, you get the blog page instead, apparently unchanged
  3. Links on AMP pages should have "amp/" to them. We can't expect mobile users to add that manually
  4. Pages and posts show with some standard theme and no navigation
  5. Sidebars seem to be ignored
  6. Sharing widget styling seems to be ignored and sharing links appear as simply links
  7. Permalinks must be updated after activation to make the "amp/" option work
  8. Adding "amp/" to a post category URL gives a 404
  9. Adding "?amp=1" to a post category URL shows the page unchanged

This plugin is seriously in its early stages.

Cheers,
Gal

Exclude content on a per-post basis

A lot of pages that use custom templates may not have a conventional IMAGE/TITLE/CONTENT structure. The ability to prevent those pages from generating what would essentially be empty AMP pages would be useful.

Floated images should not have layout=responsive

ampproject/amphtml#385

We need a min-width or drop the responsiveness. Since floated images more than likely don't need to be responsive anyway, and it's hard to set a minimum min-width for all floated images.

Basically, any images with the class alignleft or alignright should drop layout=responsive

Three Plugin Conflicts I Noticed

I noticed that this plugin causes both the Floating Social Bar and the Sexy Author Bio plugin's CSS code to be rendered on the page as text. Also, there is a JavaScript conflict with the WP Tab Widget plugin. I had to disable the plugin in order to get the JavaScript code to not render on the page as text. My site is hosted on WP Engine, but it doesn't appear to be anything specific to their services (at least that I can tell). For now I'm just hiding the display of the CSS text using display: none in CSS, ironic and horrible so if anyone knows a better way to fix this please let me know. I can then update my Sexy Author Bio plugin accordingly.

PHP 5.2 Compat

Some PHP5.3+isms have snuck in and we need to remove them.

Broken images

Using 0.1.

Photon enabled this first working block is what my typical image HTML looks like. The second block is with AMP. The image URLs are a bit different, but both are valid.

Console:
screen shot 2015-11-14 at 9 15 32 am

Works:
<img class=" size-full wp-image-2202 alignleft" src="http://i0.wp.com/developdaly.com/shared/content/uploads/2015/05/Screen-Shot-2015-05-12-at-1.38.51-PM.png?zoom=2&amp;resize=115%2C36" alt="Insecure https" width="115" height="36" srcset="http://i0.wp.com/developdaly.com/shared/content/uploads/2015/05/Screen-Shot-2015-05-12-at-1.38.51-PM.png?zoom=2&amp;resize=115%2C36" src-orig="http://i0.wp.com/developdaly.com/shared/content/uploads/2015/05/Screen-Shot-2015-05-12-at-1.38.51-PM.png?resize=115%2C36" scale="2">

Doesn't work:
<amp-img class=" size-full wp-image-2202 alignleft -amp-element -amp-layout-container -amp-error" src="http://i0.wp.com/developdaly.com/wp/../shared/content/uploads/2015/05/Screen-Shot-2015-05-12-at-1.38.51-PM.png?resize=115%2C36" alt="Insecure https" id="AMP_2"><img amp-img-id="AMP_2" alt="Insecure https" class="-amp-fill-content -amp-replaced-content" width="0" height="0"></amp-img>

http://developdaly.com/seriously-banks-obvious-website-security-issues-at-major-us-banks/
vs
http://developdaly.com/seriously-banks-obvious-website-security-issues-at-major-us-banks/amp/

2 Important Problems With WordPress Plugin

The most important problem is that the pages generated by this plugin do NOT show the Google ads: here is a page of Monty Python quotes NOT generated by this plugin, and here is the same page generated by this plugin. As you can see from the links, plugin strips Google ads and replaces them with pure code.

The second problem concerns the usability of this plugin. It does NOT add "amp" at the end of existing pages. Rather, you can create those links yourself. However, how can a site with hundreds of pages and thousands of links manually replace every link with the version that has 'amp' at the end of itself? This is impossible. Therefore, this plugin has to automatically find and replace instances of existing links. Otherwise, Google's bots are not going to index AMP pages.

Cache `/amp/` responses

On WPCOM, we should set longer-ish expiries, similar to how we handle feeds.

Ideally, these should invalidate on post updates.

kses leaves content inside stripped tags

If post content has something like <script>alert( 'Howdy' )</script>, running the content through kses for amp rendering results in alert( 'Howdy' ) showing up in the content, which isn't ideal.

Add Comments Link

Makes sense not to include comments in the amp version, of course, but if comments are on, at least a link to them seems like it would be a good idea?

amp-video/amp-audio supports limited children

amp-video only supports <source> <div fallback> and <div placeholder> as children.

amp-audio only supports <source> and <div fallback>.

We should reformat the child nodes to match this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.