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

はじめてのスタティックサイト ジェネレーター.

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

はじめてのスタティックサイト ジェネレーター.

スタティックサイト ジェネレーターの概要やGatsbyのチュートリアル、 スタティックサイト ホスティング「surge」や「Netlify」へのデプロイについての紹介。

Avatar for DigitalCube Inc.

DigitalCube Inc.

April 03, 2019

More Decks by DigitalCube Inc.

Other Decks in Technology

Transcript

  1. ͸ ͡ Ίͯͷ ε λ ςΟ ο Ϋ αΠ τ

    δΣ ω Ϩ ʔ λ ʔ 
 S E I J I A K AT S U K A D I G I TA L C U B E C O . LT D .
  2. W K J + C S M D I G

    I TA L C U B E W H O A M I ? S E I J I A K AT S U K A amimoto-ami.com getshifter.io
  3. W H AT ’ S S TAT I C S

    I T E G E N E R AT O R ʁ
  4. • React੡ͷελςΟοΫαΠτ δΣωϨʔλʔ • HTML / CSS / JavaScript /

    React.js / GraphQLͰߏ੒ • WordPress, ϦϙδτϦ্ͷϑΝΠϧ, Markdown, API, Database, YamlͳͲ Λಉ͡ΠϯλʔϑΣʔεͰσʔλιʔεʹͰ͖Δ
 ࢀߟɿhttps://wp-kyoto.net/gatsbyͰwordpress-siteͷϑϩϯτΤϯυΛ࡞ͬͯΈΔ • ੩తHTML͸ReactͷSPAͱͯ͠ͷҐஔ෇͚
  5. 1. ։ൃ؀ڥͷηοτΞοϓ
 Install Node.js, Install Git, Using the Gatsby CLI

    2. Gatsby αΠτͷ࡞੒
 $ gatsby new [SITE_DIRECTORY_NAME] [URL_OF_STARTER_GITHUB_REPO]
 σΟϨΫτϦͷ࡞੒ͱςϯϓϨʔτྨͷऔಘ 3. gatsby developίϚϯυͰαʔόʔىಈ
 $ gatsby develop
 ʮhttp://localhost:8000ʯͰϗοτϦϩʔυ͠ͳ͕Βߏங Hello world ʹτϥΠ https://www.gatsbyjs.org/tutorial/part-zero/
  6. • ੩తϑΝΠϧΛδΣωϨʔτ
 gatsbyίϚϯυͰsrc/public഑ԼͷjsϑΝΠϧ͔ΒHTMLΛੜ੒
 $ gatsby build • ελςΟοΫαΠτ ϗεςΟϯάʮsurge.shʯʹσϓϩΠ
 $

    npm install --global surge (SuegeͷϑϦʔΞΧ΢ϯτΛొ࿥)
 $ surge public/ (σϓϩΠ)
 ΞΫηεՄೳͳURL͕දࣔ͞ΕΔ Go live via surge!
  7. W H AT ’ S S TAT I C S

    I T E H O S T I N G ?
  8. ελςΟοΫαΠτ ϗεςΟϯάͷछྨ https://www.slant.co/topics/2256/~best-static-website-hosting-provider#1 1. HostingͷΈ
 GitHubPages΍GitLabPages 
 Amazon S3 /

    EC2 / VPS ͳͲ 2. Ϗϧυ, σϓϩΠ, ϗεςΟϯά
 Netlify (GitHub / GitLab / Bitbucket) 3. CMS, Ϗϧυ, σϓϩΠ, ϗεςΟϯά
 Netlify CMS , forestry.io, 4. All in One, Full Web UI for WordPress
 Shifter WordPressͷ੩తԽ͔ΒGlobal CDN·Ͱ
  9. 1. GitHub, GitLab, BitbucketΞΧ΢ϯτΛ༻ҙ 2. NetlifyͷΞΧ΢ϯτΛ༻ҙ
 GitHub, GitLab, BitbucketͰϩάΠϯՄೳ 3.

    NetlifyʹϦϙδτϦΛඥ෇͚
 σϓϩΠίϚϯυʮGatsyby buildʯ
 ެ։σΟϨΫτϦʮpublic/ʯ 4. ϦϙδτϦʹcommit & push
 Netlify͕δΣωϨʔτͯ͘͠ΕΔͷͰศར 5. That’s it!
 gatsby-cliΛ࢖͏৔߹͸ͪ͜ΒΛࢀর
 A Step-by-Step Guide: Gatsby on Netlify ͓·͚ Go live via Netlify!
  10. • ඪ४ػೳ
 Global deployment, right from Git
 HTTPS, custom domains,

    DNS management • CDNͷଳҬɿ100GB/݄ • Ϣʔβʔ਺ɿ1໊ • OrganizationɿProҎ্ • ύεϫʔυϩάΠϯɿProҎ্ • ACLɿBusinessҎ্ • Audit log ɿBusinessҎ্ Free usage
  11. Less Is More. Let's go static with Shifter. • ΑΓྑ͍ύϑΥʔϚϯε

    (Static HTML + CDN) • ΑΓߴ͍ηΩϡϦςΟ (Micro services archtechture) • ΑΓ҆ՁͰ؆୯ͳεέʔϦϯά (No ops) • ΑΓྑ࣭ͳ։ൃऀΤΫεϖϦΤϯε (Cool, Clean architecture, Community friendly)