AMP ãã£ãã·ã¥ãè¶ ããã·ã¹ãã ãèªç¤¾ãã¡ã¤ã³ã§å®ç¾ããæ¹æ³â¨â¨ / How to implement a system that goes beyond amp-caching on your domain
ã¢ã¡ã¼ãã¹ã¿ããããã°ã§ãè¨è¼ããã¦ããã ããéãã11/15ããé 次ã¢ã¡ããã®AMP対å¿ãçµäºããããã¨ã«ãªãã¾ããã ãªãAMPããããã®ãï¼2016å¹´ã®3æã«ã¢ã¡ããã¯AMP対å¿ãã¹ã¿ã¼ãããã¦ãã¾ããã ï¼å½æã®ããã°è¨äºã¯ãã¡ãï¼ ãããã5年以ä¸AMPãæ¡ç¨ããã¢ãã¤ã«ã®æ¤ç´¢çµæããã¯AMPãã£ãã·ã¥ã«é£ã¶ããã«ãªã£ã¦ãã¾ããã Googleã®æ¤ç´¢çµæããã¯Googleã®ãã£ãã·ã¥ã«ç§»åããããã§ãå½ç¶ä½æé度ã¨ãã¦ã¯è¯å¥½ãªãã®ã§ãã£ãã¨æãã¾ãã ããããªã®ã«ãªããããã®ãï¼ã ã§ãããåºæ¬çã«ã¯ãã¸ãã¹çãªåé¡ã¨ãªãã¾ãã ã¦ã§ãçã®ç¶æ³ã社ä¼ç¶æ³çã ã«ãã£ã¦ã®ç·åçãªå¤æã¨ãããã¨ã«ãªãã¾ãã æ¤ç´¢çµæãã¯ãªãã¯ãããéã«Googleã®ãã£ãã·ã¥ã表示ãããã¨ããç¹ã§ã¯ãCDNã®ã³ã¹ãåæ¸çã¯ããã®ã§ãããããã§ããã¯ããã¼ã¿ã«ã§èããã¨ãã«ä»åã¯AMPãçµäºãããã¨ãã
Intro ååã®è¨äºã§ãå¥éã«ãæ¬ãµã¤ãã® AMP 対å¿ãè½ã¨ããã¨ã«ãªã£ããããããããã§ãªãã¦ã AMP ãã©ããã§ããããã¨ã¯èãã¦ããããããã£ããã®ä¸ã¤ã SXG 対å¿ã«ãªã£ãã®ã¯ãé å½ãªæµãã ã¨çè ã¯æãã¦ããã ãã㯠AMP ããªãå§ã¾ãããªããã¼ã³ãã¦ã³ãã¤ã¤ããã®ããããã¦ããããã©ããªã£ã¦ããã®ããã¨ããæµããã¾ã¨ããããæ©ä¼ã§ãããã ãã®éç¨ã§çã¿åºãããæ¬ãµã¤ãã§ãæ¤è¨¼ãç¶ãã¦ãã Performance Timing API, Core Web Vitals, Signed HTTP Exchange ãããã¦ä»æ§æ³ããã¦ãã Bento AMP ãªã©ãè¸ã¾ããä¸é£ã®æµããè¦ãã¦ããç¯å²ã§è¨é²ã¨ãã¦ã¾ã¨ãã¦ããã ã½ã¼ã¹ã¯çè ã®ä¸»è¦³ã§ãããçºãã¦ããä½æã mozaic.fm ã® Monthly Web ãªã©ã§è©±ãã¦ãããã®ããã¼ã¹ãªã®ã§ãä¿¡é ¼æ§ãæ£ç¢ºæ§ã¯æ
ã¯ããã¾ãã¦ãããããããã¼ãã¥ã¼ãã£ã¼ã³ã¹ã¡(ä»¥ä¸ HPBC) ã® Web ããã³ãã¨ã³ãã¨ã³ã¸ãã¢ã¨ãã¦å¦çã¢ã«ãã¤ãããã¦ããä¸å³¶ã§ãã3 ã¶æéã®ã¢ã«ãã¤ãæéã§ãæ¡ä»¶ã«é¢ããæ©è½éçºã SEO æ½çã®æ¤è¨ã¨å®è£ ãããã©ã¼ãã³ã¹æ¹åãªã©æ§ã ãªæ¥åã«åãçµã¾ãã¦ããã ãã¾ãããæ¬è¨äºã§ã¯ãã®ä¸ã§ããç§ãåãçµãã HPBC ã«ãããããã©ã¼ãã³ã¹æ¹åã«ã¤ãã¦ç´¹ä»ãã¾ãã ç®æ¬¡ 1.ãã¯ããã« 2.ãæ³å®èªè 3.ãAMP ã¨ã¯ 4.ãããã©ã¼ãã³ã¹æ¹åã®åæç¥è 5.ãç¾ç¶è¨æ¸¬ 6.ãåé¡ç¹å® 7.ãåé¡è§£æ±º 8.ãä»å¾ 9.ãã¾ã¨ã ã¯ããã« HPBC ã®éçºããã¸ã§ã¯ãã§ã¯ãWeb ãã¼ã¸ãé²è¦§ãã¦ãããã¦ã¼ã¶ã¼ã«ã¨ã£ã¦ãã¼ã¸ãå®å ¨ã«è¡¨ç¤ºãããã¾ã§ã®ã¹ãã¼ããã¤ã¾ããããã©ã¼ãã³ã¹ã大äºã§ãããã¨ããèªèããã¼ã å ¨ä½ã§å ±æãã¦ãã¾ããWeb ãµã¼ãã¹ã®ãããã¯ãã¯ãæ©è½ã®è¿½å ã»æ¹
next.js ã§èªåã®ããã°ãä½ã èªåã®ããã°ã¨ã㦠mizchi.dev ãä½ã£ã話 at é ç°å·.js #1(ãªã³ã©ã¤ã³) - connpass ä½ãä½ã£ãã ãã®ããã°èªèº«(mizchi.dev)ãã¹ã©ã¤ããã¼ã«ãçªè²«ã§èªä½ ã½ã¼ã¹ã³ã¼ã mizchi/dev Lighthouse Full AMP GA å¯¾å¿ Git ããç·¨éãã¹ããªã®çæ ã©ããªããã°ãã»ããã£ãã Lighthouse ã§æºç¹åºããã æ®éã® Markdown ããã¤ã¾ããªããã MDX ã§æ¸ããã ãµã¼ãã¼ã®éç¨ãããããªã next.js ã®æé©åã«ä¹ããã ä½ã£ã ã©ããåããªãã CDN ä¸ã§éçãµã¤ã + Full AMP MDX ã³ã³ãã¤ã©ãèªä½ (amdx) netlify + è²·ã£ãã¾ã¾å¿ãã¦ãã«ã¹ã¿ã ãã¡ã¤ã³(mizchi.dev) pages/*.tsx ãå ¬éãããä»çµã¿ãããã®ã¾ã¾æ¡
PWA Night ã§çºè¡¨ãã Next.js x AMP ã®è©±ã§ãã
ãã®ãªãã¸ã㪠ã§ãã£ããã¨ã ãããã¨ããã㨠tailwind.css 㯠Utility First ã¨éæã£ã CSS ãã¬ã¼ã ã¯ã¼ã¯ã§ãã³ã³ãã¼ãã³ãåãåæã¨ããã¢ãã³ãã¬ã¼ã ã¯ã¼ã¯ã¨ç¸æ§ãããã§ããä»å㯠next.js ã® amp-mode 㧠tailwind ã使ããã¨ãã¦ã¿ã¾ããã Tailwind CSS - A Utility-First CSS Framework for Rapidly Building Custom Designs åé¡ åæã¨ãã¦ã amp ã«ã¯ inline css ã®å®¹éå¶éãããã75kb ãè¶ ãã㨠AMP ã¨èªèãããªããªãã¾ãã tailwind ã¯ãã«ããã¦ä½¿ãã®ãåæã®ãã¬ã¼ã ã¯ã¼ã¯ã§ãããå ¨é¨å ¥ãã® tailwind.min.css 㯠1.3 M ããã¾ããããã§ã¯å°åºã75 kb ã«åã¾ãã¾ããã AMP ã® CSS
Recently, I was refactoring my blog using Next.js by a whim. There are 3 tech stacks I would use: Next.js , a popular React framework with SSG, SSR support naturally Tailwindcss , a low-level CSS framework with the utility-first concept. AMP , an HTML framework developed by Google to make your website fast and loading smoothly. However, There are so many restrictions in AMP for performance issues.
ãã®è¨äºã¯ amdxg ãä½ããªãã, next.js 㧠AMP ã«å¯¾å¿ããã¨ãã«ãã£ããã¨ã§ãã ã³ã¼ãã¯ãã¡ãã§ã amdx/packages/ssg at master · mizchi/amdx AMP ã«ã¤ã㦠Google ã®æ¨å¥¨ãã HTML ã®ãµãã»ããä»æ§ã§ããå¶ç´ä»ãã®ã¤ã³ã©ã¤ã³ CSS ã®ã¿ + ä¸åã® JS ãæ¸ããã代ããã«åãããããã®ã¯ amp plugin ã使ã£ã¦è¨è¿°ãã¾ãã ã¢ãã¤ã«ã§ã¯ãGoogle ã®æ¤ç´¢çµæç»é¢ãã㯠GoogleCDN ä¸ã®ãã£ãã·ã¥ãè¿å´ãããã®ã§ãé常ã«é«éã«éããã¨ãã§ãã¾ãã (â¡ ãã¼ã¯ã AMP 対å¿ã®å°) ã¢ãã¤ã«ã«éããããã種ã®ãã¹ããã©ã¯ãã£ã¹ã®å¼·å¶ãªã®ã§ãPC ã§ã AMP 対å¿ãããã¨ã«æå³ã¯ããã¾ãã ãã®è¨äºã§ã¯ãå®éã«ãã®ããã°ã®ããã® SSG ãä½ãéç¨ã§ãã©ã®ããã« next.js ä¸ã§ AMP
[ã¬ãã«: ä¸ç´] AMP ã¹ãã¼ãªã¼å°ç¨ã®ã»ã¯ã·ã§ã³ãæ¤ç´¢çµæã«è¡¨ç¤ºãããããã«ãªãã¾ãã æ±äº¬ã®å æ¬æ¨ã§ 4 æ 17 ã 18 æ¥ã«éå¬ããã AMP Conf 2019 ã§çºè¡¨ãããã¾ããã AMP ã¹ãã¼ãªã¼ã¯ãæ¬ããã©ãã©ã¨ãããããã«ãã¦ç©èªé¢¨ã«ä¸é£ã®æ å ±ãé²è¦§ã§ãã AMP ã®æ©è½ã§ãã æåã§ã¯ãªããç»åãåç»ããµãã ãã«ä½¿ã£ããã¸ã¥ã¢ã«ãã«ç¹å¾´ãããã¾ãã ãã¡ãã¯ãAMP Conf ã§ç´¹ä»ããã楽天ã¬ã·ãã® AMP ã¹ãã¼ãªã¼ã§ãã åç»ã®ããã§ãããAMP HTML ã§ä½æããã¦ãã¾ãã å°ç¨ã¢ããªã¯ä¸è¦ã§ããã©ãããã¼ã ãåãããã©ã¦ã¶ã§è¡¨ç¤ºã§ãã¾ãã Google æ¤ç´¢ã® AMP ã¹ãã¼ãªã¼ ç¾å¨ã¯ã2 ã¤ã®ã¿ã¤ã㧠AMP ã¹ãã¼ãªã¼ ã¯ã¢ãã¤ã«æ¤ç´¢çµæã«è¡¨ç¤ºããã¾ãã ã«ã«ã¼ã»ã« ãµã¤ãå°ç¨ (host-specific) ã®ã«ã«ã¼ã»ã«ã«ãã®ãµã¤ãã® AMP
AMP Conf å ¨ä½ã®ææ³ã¯å¾åãã«ãã¦(æ¸ããªããã)ã amp-script ã«ã¤ã㦠åã«ä½¿ã£ã¦ã¿ãã人㯠AMP ã§ä»»æã® JS ãå®è¡ã§ãã amp-script ã試ãã¦ã¿ã - Qiita ã https://github.com/mizchi-sandbox/amp-script-preact 㧠æåã« åã® amp ã«å¯¾ããã¹ã¿ã³ã¹ã¯ http://ampletter.org/?lang=ja ã«ç¤ºãããæ¸å¿µã¨ã ãããåãã§ãåºæ¬çã«AMPã¯éªæªãªãã®ãç¾ä»£ã®ã¦ã§ãã®äºæ ãèæ ®ããå¿ è¦æªã¨æªã®ä¸éãããã ã¨æã£ã¦ãããããã¨åæã«æ¥µç«¯ã«ãªã½ã¼ã¹ãå¶ç´ãããããã°ã©ãã³ã°ç°å¢ã¨ãããã®ã好ãã§ãããããç¹ã§ AMP ç±æ¥ã®æè¡ã追ã£ã¦ãããã¨ããç«å ´ã amp-script ã«ã¤ãã¦ç¥ã£ã¦ãããã¨ å ¨ç¶ããã¥ã¡ã³ããªãã®ã§ãã³ã¼ãèªãã§ãæ¸ãã¦ã触ã£ã¦ããã¨ä¸ã®äººéã«ç´
AMP Confã¯AMPã®ææ°æ å ±ãæãã¦ããããäºæ¥éã®ã«ã³ãã¡ã¬ã³ã¹ã§ãååä¸3ã»ãã·ã§ã³åå¾8ã»ãã·ã§ã³ã¿ãããªãè©°ãè©°ãã®ä¼ã å¹´ã«1åä¸çã®ã©ããã§éå¬ãããä¼ã§ãçºè¡¨ã»ã¼è±èªã7:3ãããã§7ãæµ·å¤ã®æ¹ã§ãå»ä¸ã§ã³ã¼ãã¼é£²ãã§ãã¨ããã¼ããªãã®ã¸ã§ãã¯ãªãã§ããã¿ãããªæãã§è±ä¼è©±ãå§ã¾ããã¤ã³ãã®æ¹ã¨ä»²è¯ããªã£ã¦instagramãtwitterã®ã¢ã«ã¦ã³ããªã©äº¤æããã å°è±¡ã«æ®ã£ããã¨ãã¡ã¢ãã¦ããã amp-script AMPã§ã¯JSã®å®è¡ãä¸å¯è½ã ã£ãã®ããã¤ãã«å¯è½ã«ãªã£ããWeb Workerã§å®è¡ãããã ãªãã§ãã§ãã¦ãã¾ãã¨HTMLã¨åæ§åä½ãéããªã£ã¦ãã¾ãã®ã§ããªãã§ãã§ããããã§ã¯ãªããã¦ã¼ã¶ã¼ã®ã¤ã³ã¿ã©ã¯ã·ã§ã³ãã£ããã§åããä¸åº¦ã®å®è¡ã¯5ç§ä»¥å ã150KBã¾ã§ããªã©ããã©ã¼ãã³ã¹ãç¶æããããã®å¶ç´ãããã åã£ããã¨ãããã°ã§ããããã§ããã¢ã§
ããã«ã¡ãã@t32kã§ããå æ¥ã3/18ã«å¤§éªã§éå¬ãããFRONTEND CONFERENCE 2017ã«ç»å£ãã¦ãã¾ãããã¾ãå¼ç¤¾ã¡ã«ã«ãªã¯æ親ä¼ã¹ãã³ãµã¼ã§ãããä»åã¯ãã¹ã¿ã³ãã¢ãã³AMPã®ã¹ã¹ã¡ãã¨ããã¿ã¤ãã«ã§è¬æ¼ããå 容ãã·ã§ã¢ãããæãã¾ãã ç§ãæå±ãã¦ããã½ã¦ã¾ã¦ç¤¾ã§ã¯ã¡ã«ã«ãªã¢ããã¨ããã¯ã©ã·ãã¡ã¤ããµã¼ãã¹ãä½ã£ã¦ãã¾ããã¡ã«ã«ãªã¯é éã·ã¹ãã ãä»ãã¦å£²è²·ãã¾ããããã¡ãã¯ç´æ¥ä¼ã£ã¦æ渡ãã§ã¢ãã®å£²ãè²·ããã§ãã¾ãããã¡ãããææ°æãé éæã¯ãããã¾ããã®ã§ãããããã£ãã使ã£ã¦ã¿ã¦ãã ãããç§ã¯ããã®Webæ å½ã§ãæ¬ãµã¤ãã®AMPå®è£ ã«ã¤ãã¦è©±ãã¾ãã ä»æ¥ã®ã¢ã¸ã§ã³ãã§ãã AMPã®ã¡ãªãã 表ç¾åã«ã¤ã㦠ãã³ãã¬ã¼ãåæ£ã«ã¤ã㦠æ§é åãã¼ã¿ã«ã¤ã㦠ã¾ã¨ã ã¨ãã£ãå 容ã§ãã£ã¦ããããã¨æãã¾ãã AMPã¨ã¯ï¼ ã¾ãã¯AMPã¨ã¯ä½ã説æãã¾ããAMPã¨ã¯
ãã¬ã¼ã³ã¢ã¼ã åç â / âã§ç§»å fã§ãã«ã¹ã¯ãªã¼ã³ escã§ããã ããã«ã¡ã¯ï¼id:hitode909ã§ãï¼ãã®ãã¨14æããåå·ã®ãã¤ã¯ãã½ããæ§ã®ãªãã£ã¹ã§ãããªããã¦ããï¼YAP(Pã¯ããã¢ã³ã®P)Cã§çºè¡¨ãã¾ãï¼ ãã®è¨äºã§ã¯ï¼çºè¡¨è³æãå ¬éãããã¾ãï¼ç¾å°ã®æ¹ã¯ä»ããCã«ã¼ã ã«æ¥ã¦ãã ããï¼ããã§ãªãããã¯æ親ä¼ã§ãä¼ããã¾ãããï¼ ã¯ã¦ãªããã°ã®ãããã¯ãããããã§ãï¼ ãããã¯ãYAPCã #yapc8ojic ã®ãã¤ã¼ã ã¯ã¦ãªããã°ã®AMP対å¿ã§å¦ã¶ã¦ã§ããµã¼ãã¹ã®AMPå¯¾å¿ 2016/07/03 YAP(achimon)C::Asia Hachioji 2016 mid in Shinagawa hitode909 èªå·±ç´¹ä» id:hitode909 @hitode909 京é½ããæ¥ã¾ãã ã¯ã¦ãªã§ã¯ã¦ãªããã°ãä½ã£ã¦ãã èªå·±ç´¹ä» YAPC 2015ã§ãã¹ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}