Upgrade to Pro — share decks privately, control downloads, hide ads and more …

1000万以上のWebページを AMPにした話 / making_over_10million_amp_pages

1000万以上のWebページを AMPにした話 / making_over_10million_amp_pages

HTML5 Conference 2018のLT資料です。
https://events.html5j.org/conference/2018/11/

Masashi Hirano

November 25, 2018
Tweet

More Decks by Masashi Hirano

Other Decks in Programming

Transcript

  1. ฏ໺ ণ࢜ / Masashi Hirano ɹɹɹɹ Kyoto office @shisama_ @shisama

    Node.js Core Collaborator ؔ੢NodeֶԂOrganizer
  2. SEO

  3. // ඇAMPϖʔδଆ if (word.startWith("n")) { <link rel=“amphtml" href=“https://ejje.weblio.jp/…“/> } //

    AMPϖʔδଆ if (word.startWith("n")) { <link rel=“canonical" href=“https://ejje.weblio.jp/…“/> } n͔Β࢝·Δ୯ޠͷΈ AMPͱͯ͠ݕग़ͤ͞Δ ஈ֊తʹAMPʹ͍ͯ͘͠
  4. Promise.all([ amphtmlValidator.getInstance(), getHtml(), ]).then(([validator,html]) => { const result = validator.validateString(html);

    for (const error of result.errors) { throw new Error(error.message); } }); CIͰ࣮ߦͯ͠ νΣοΫ͢Δ͜ͱ͕Մೳ ༗ޮͳAMP͔ݕূ͢Δ