官方套件 · 框架

Statamic 控制台的即時協作

看到還有誰開著同一篇內容、有人儲存時立刻收到提醒、即時留言,並用 QR Code 在手機上開即時預覽。適用 Statamic 5 與 6,flat file 或資料庫皆可。

  • 顯示同一篇內容上每個人的頭像,有人儲存時跳出提醒,沒有人會繼續編輯舊版本。
  • 在內容上即時留言,只能檢視的審稿人也能留言。留言存成 JSON 檔,不需要資料庫。
  • 每次頻道訂閱與留言都會依 Statamic 本身的權限檢查,Statamic 內建的 Echo 用戶端(statamic/collaboration)也能直接在上面運作。

登入後,範例程式碼會自動帶入您的叢集主機。 登入

  1. 安裝

    composer require hibira-io/statamic
    php artisan hibira:install
    php artisan hibira:check
  2. 使用

    Open an entry in two browsers, signed in as two users:
    the dock with avatars and comments appears in the bottom right corner.
    
    Open Live Preview once, then press the phone button
    for a QR code that opens the preview on another device.

開始之前

  • 應用程式的密鑰只會在建立應用程式或輪替密鑰時顯示一次。請只放在伺服器上,不要放進瀏覽器或遊戲的建置檔。
  • 把網站網址(例如 https://example.com)加進應用程式的「允許的來源」,控制台與預覽頁面才能連線。

請使用儀表板中的應用程式 Key;Secret 只放在你的伺服器上。頻道、事件與授權端點的用法和 Pusher 完全相同。 免費建立帳號 →