AMP plugin hamwe ninkunga ya code ya JavaScript

Amashanyarazi yihuta ya paje (AMP) yo gukora paji ya Google AMP , amacomeka ya AMP hamwe na generator ya AMPHTML ashyigikira iyakirwa rya JavaScript yawe.


Kwamamaza

Shyiramo JavaScript yihariye


extension

JavaScript yawe wenyine nibirimo iframe birashobora gukoreshwa gusa mumapaji ya AMP mubihe bimwe.

Kode yawe ya JavaScript yawe irashobora kwinjizwa muri AMPHTML gusa iyo yinjijwe hakoreshejwe iframe.

Iframes muri AMPHTML (ukoresheje tagi ya 'amp-iframe') wemera gusa ibirimo bifite ibanga rya HTTPS.

Niba ushaka gukoresha JavaScript yawe wenyine muri AMPHTML, ugomba kubitanga ukoresheje umurongo wa HTTPS hanyuma ukabishyira mubisobanuro byurubuga ukoresheje Iframe, kugirango Generator yihuta ya paji ya Generator irashobora noneho kumenya JavaScript yawe hanyuma ukayihindura. Kuri 'amp Guhindura -iframe' ibirango hanyuma ubihuze kurupapuro rwa AMP.

Imashini itanga AMPHTML rero imenya iframes ihuriweho (harimo na JavaScriptts), ikayihindura muri tagi ya 'amp-iframe' ihuye, kandi igakora JavaScript yonyine irimo iboneka muri verisiyo ya AMP.

Kugira ngo ukoreshe JavaScript yawe muri AMPHTML, ibintu bikurikira bigomba kuba byujuje:

  • JavaScript yawe bwite igomba kuboneka munsi ya HTTPS
  • JavaScript yawe bwite igomba gushyirwaho ukoresheje iframe

Kwamamaza