Syoki Ogawa
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Jamstack構成のサイトブログ ``` ## <参考サイト> https://qiita.com/ozaki25/items/4075d03278d1fb51cc37 https://blog.microcms.io/jamstack-introduction/ https://blog.microcms.io/jamstack-introduction/ <テーマ:jamstack> 自社のコーポレートサイトの表示スピードが遅くイライラする。 表示スピードが遅いとSEO的にもペナルティ。 特にスマホで見ると遅いのでなんとかしたいが、制作会社に相談してもなかなか改善されない。 みたいな悩みを抱えている、中小企業経営者やWeb担当者に向けて、 従来の方法(WordPress)をベースにサイト表示を爆速にしてモダンなサイトにできるよっていう コンテンツを作りたい。 <タイトル案(仮)> ・爆速のコーポレートサイトを開発してみた ・サイトの表示速度で悩む経営者必見!爆速サイトの作り方教えます ・もっさりサイトとはおさらば!JamStackでコーポレートサイトを爆速にしよう <コンテンツの流れ> ## リード文 今回自社のコーポレートサイトをJamStackでリニューアルした。 ## サイトの表示が遅いことで起こる機会損失 SEOの低下やユーザビリティの低下。 ## JamStackとは何か? ### 既存のサイトとの違い ### JamStackのメリット・デメリット ### どんなサイトがJamStackに向いてるの? ### どのような技術構成? ### クランチタイマーのコーポレートサイトの技術スタック ## サイトの置き換えは可能? クライアント側のサイトがWordPressだったら置き換えできるよ。 ## おわりに もしサイト速度で悩んでいたら? クランチタイマーにお問合せを。 ``` - [ ] リード文(担当: ) - [x] サイトの表示が遅いことで起こる機会損失(担当: 寺岡) - [x] Jamstackとは何か?(担当: 寺岡) - [x] 既存のサイトの違い(担当: 寺岡) - [x] Jamstackのメリットデメリット(担当: 小川->寺岡) - [x] どんなサイトがJamStackに向いてるの?(担当: 寺岡) - [x] どのような技術構成?(担当: 省略) - [x] クランチタイマーのコーポレートサイトの技術スタック(担当: 小川) - [ ] サイトの置き換えは可能?(担当: ) - [ ] 終わりに(担当: ) 以下ブログ内容の記述お願いします。 # タイトル: 未定 ## リード文 今回自社のコーポレートサイトをJamStackでリニューアルした。 ## サイトの表示が遅いことで起こる機会損失 今回のサイトリニューアルの最も大きな目的は表示速度の向上です. ここでは,Webサイトの表示速度が遅いことで起こる機会損失について簡単に説明します. ### ユーザビリティの低下 表示速度が遅いことで起こる悪影響として,最も大きいのがユーザビリティの低下でしょう. 最近は昔と比べて速いWebサイトに慣れているユーザーが多いため,内容に興味があったとしても表示速度が遅いと簡単に離脱し,他のサイトに流れていってしまいます. 表示速度の低下はユーザーにストレスを与えるだけでなく,離脱率や回遊率,リピート率などあらゆる指標に悪影響を与え,大きな機会損失に繋がります. ### SEOの低下 表示速度はSEOにも大きく影響します. 2021年にGoogleがWebサイトの検索ランキングを決定するための要素として,Core Web Vitalsと呼ばれる3つの指標を組み込みましたが,その中のLCP(Largest Contentful Paint)とFID(First Input Delay)は表示速度や応答速度が特に大きく関係する指標です. このように,表示速度の遅いサイトは検索ランキングの上位に表示されにくくなっていることがGoogleによって明言されており,ユーザーとの接点を多く作るという意味でも表示速度が重要になってきています. ## Jamstackとは何か? Jamstackは,より高速かつ安全かつ高い拡張性を持ったWebサイト/Webアプリを構築できるように設計されたアーキテクチャです. 具体的には,ヘッドレスCMSを用いてコンテンツの作成や管理を行い,SG(SSG)を用いて事前にビルドした静的ページをCDNによって高速に配信するという構成が一般的です. JamstackのJamはJavaScript・APIs・Markupそれぞれの頭文字からきているそうですが,[公式サイト](https://jamstack.org/what-is-jamstack/)では,コアとなる要素はPre-renderingとdecouplingの2つであると述べられています. ## 既存のWebサイトとの比較 ここでは,Webサイト制作において現在最も一般的であるCMS(WordPressなど)単体の構成と比較していきます. CMS単体の場合とJamstackの場合それぞれの流れは下図のようになります. #### CMS単体 ![CMS単体](https://i.imgur.com/ed3cazA.png) #### Jamstack ![Jamstack](https://i.imgur.com/zTw7Q9v.png) ### ユーザー視点 図中の黄色の矢印はユーザーがサイトを訪問してからページが表示されるまでの流れを表しています. CMS単体と比較して,Jamstackの場合はデータ取得の行程がないことが分かります. これは,ユーザーがサイトを訪問する前に,ビルドと呼ばれるデータを取得してHTMLを生成しておく処理(青色の矢印)が行われているためです. ### 管理者視点 図中のグレーの矢印が管理者によるコンテンツ更新作業の流れです. CMS単体とJamstackで全く違いがないことが分かります. (ただし,Jamstackの場合,コンテンツの反映には再度ビルド作業が必要です) 管理者は技術に明るくない場合も多いため,CMS単体からJamstackに移行したとしてもコンテンツ更新作業が複雑化しないのは嬉しいですね. ## JAMstackのメリットデメリット CMS(WordPressなど)単体の構成と比較したときのJamstackの主なメリットとデメリットを紹介します. ### メリット 1. 高速なページ表示が可能 2. セキュリティリスクが低い 3. 大量アクセスに強い #### 1. 高速なページ表示が可能 Jamstack構成のサイトでは、サイトビルド時に全てのwebサイトのページを静的なページとして作成するため通常のサイトに比べ、サイト表示するためのローディングがなく高速でサイト表示が行えるのが大きなメリットです。 #### 2. セキュリティリスクが低い Jamstackサイトでは閲覧時に静的ファイルを返すのみであるため,Webサーバーとの通信が発生しません.そのため閲覧者からは記事やユーザーの情報を扱うwebサーバーの特定が困難であり,攻撃を受けるリスクが比較的低いです. #### 3. 大量アクセスに強い WordPressサイトのような動的サイトではアクセス毎にWebサーバーにリクエストを送り通信を行う必要がありますが,JamStackサイトではそのような処理は発生せず,事前に用意された静的ファイルを返却するのみであるため,大量アクセスによる負荷がほとんどありません. ### デメリット 1. 動的要素を扱えない 2. ビルドに時間がかかる 3. 開発・変更に専門的なスキルが必要 #### 1. 動的要素を扱えない 動的要素とは,ページにアクセスしたタイミングやユーザーに応じて変動するような要素のことです.例えば,Twitterのように高頻度で更新されるコンテンツをリアルタイムで反映するのは難しいです. しかし,静的要素がメインであるような一部のページのみJamstack化することも可能ですし,最近では周辺技術の発展によって,動的要素も扱えるように進化してきています. #### 2. ビルド(静的ページ生成)に時間がかかる サイトの更新を反映させるためには全ページのビルドを行う必要があり,ページ数が多いほどこの時間は長くなります. しかし,この問題についても,定期的に自動更新を行ったり,一部の更新があったページのみ再度ビルドを行うような技術が発展しており,時間短縮が進んでいます. #### 3. 開発・変更に専門的なスキルが必要 Jamstackサイトの開発やサイトデザインの変更には,HTMLやCSSだけでなく,JavaScriptやAPI等に関する専門的な知識が求められます. (記事の投稿や更新等はWordPress等のCMSを扱うことができれば問題ありません) ## どんなサイトがJamStackに向いてるの? 先に述べたように,Jamstackでは事前にデータを取得し静的ページを生成するという流れになっているため,全てのWebサイト/WebアプリがJamstackに向いている訳ではありません. Jamstackに向いているWebサイト/Webアプリの特徴としては以下のような項目が挙げられます. - 静的な要素がメインである - コンテンツの更新頻度が比較的少ない - データの更新がリアルタイムに反映される必要がない 具体的には,ブログやコーポレートサイトなどが向いていると言えます. 逆に,TwitterやInstagramのように,動的な要素がメインで,コンテンツの更新頻度が高く,データの更新がリアルタイムに反映される必要があるようなWebサイト/Webアプリは基本的にはあまり向いていないでしょう. ※ISR(Incrimental Static Regeneration)などの機能を使えば実現可能な場合もあります ## クランチタイマーのコーポレートサイトの技術スタック クランチタイマーでは、フロントエンドをNext.js、バックエンドをWordpress、データ取得方法をGraphQLを使用しています。 ### フロントエンドの技術 フロントエンド側では、なるべくリアルタイムのデータをユーザーに表示するために、SSG(静的サイトジェネレーション) + Pre fetch + ISR (Increment Static Regeneration) + client side fetching(useSWR)の構成をとっています。 SSG + Pre fetchでは、初めのサイトデプロイ(ビルド時)にWordpress側からデータを取得してき、全ての静的ページを作成します。静的ページなのでサイト表示は非常に早くなります。しかし、管理者が新しいブログなどを投稿した際データはWordpress側では存在するが、サイト側では反映されずユーザーには見えない、という状態になってしまいます。その問題を解決するのが、ISR(Increment Static Regeneration)とclient side fetching(useSWR)です。 ISRでは、Next.js側で設定した間隔でサイトを自動で再ビルドすることができ(厳密には少し異なりますが)、管理者が新しいブログを追加したとしても、いづれはサイトに反映されユーザーに見てもらうことができます。 それでも、ISRだけでは自動ビルドが行われる前に訪れたユーザーに対しては最新のデータを届けることができません。そこで、client side fetching(useSWR)の出番です。client side fetchingでは、ユーザーがサイトを表示したタイミングで、wordpressnにデータを取得してき、最新のデータをサイトに表示することができます。 これらの技術を集約しクランチタイマーのコーポレイトサイトは、なるべく最新のデータを、サイトのちらつきを抑えユーザーに提供するようにしております。 ### バックエンドの技術 バックエンドではwordpressを使用しており、これまでのwordpressのプラグインを使用し「お問い合わせページ」、「SEO」対策なども行なっております。また、ブログ投稿もこれまでとは変化はないので、エンジニアでない方でも簡単にデータの投稿、編集が可能です。 ## サイトの置き換えは可能? WordPressだったら置き換えできるよ。 ## 終わりに もしサイト速度で悩んでいたら? クランチタイマーにお問合せを。

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully