> ## Documentation Index
> Fetch the complete documentation index at: https://docs.happycapy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish & Remix

> 發布可 Remix 的 Project 快照，讓別人或自己複製成新的 Project 繼續使用。

export function LivePreview({url, label, linkLabel = "Open live result", fit = "content"}) {
  const isContentFit = fit === "content";
  return <div className={`hc-live-preview${isContentFit ? " hc-preview-content" : ""}`} style={{
    width: isContentFit ? "100%" : "clamp(320px, calc(100vw - 640px), 960px)",
    margin: isContentFit ? "18px 0 32px" : "18px 0 32px 50%",
    transform: isContentFit ? "none" : "translateX(-50%)",
    border: "1px solid rgba(46, 41, 41, 0.1)",
    borderRadius: "10px",
    overflow: "hidden",
    background: "rgba(255, 255, 255, 0.55)",
    boxShadow: "0 18px 45px rgba(46, 41, 41, 0.08)"
  }}>
      <style>{`
        .hc-live-preview-clip {
          position: relative;
          container-type: inline-size;
          aspect-ratio: 16 / 10;
          height: auto;
          overflow: hidden;
          background: white;
        }

        .hc-live-preview-frame {
          position: absolute;
          left: 0;
          top: 0;
          width: 1280px !important;
          height: 800px !important;
          max-width: none !important;
          border: 0;
          background: white;
          display: block;
          transform: scale(calc(100cqw / 1280px));
          transform-origin: top left;
        }

        @media (max-width: 1279px) {
          .hc-live-preview:not(.hc-preview-content) {
            width: 100% !important;
            margin-left: 0 !important;
            transform: none !important;
          }

          .hc-live-preview:not(.hc-preview-content) .hc-live-preview-clip {
            height: min(70vh, 520px);
          }

          .hc-live-preview:not(.hc-preview-content) .hc-live-preview-frame {
            width: 100%;
            height: 100%;
            transform: none;
          }
        }
      `}</style>
      <div style={{
    display: "flex",
    alignItems: "center",
    gap: "8px",
    padding: "10px 12px",
    borderBottom: "1px solid rgba(46, 41, 41, 0.08)",
    background: "rgba(46, 41, 41, 0.035)"
  }}>
        <span style={{
    width: "8px",
    height: "8px",
    borderRadius: "999px",
    background: "#F8A963"
  }} />
        <span style={{
    width: "8px",
    height: "8px",
    borderRadius: "999px",
    background: "rgba(46, 41, 41, 0.18)"
  }} />
        <span style={{
    width: "8px",
    height: "8px",
    borderRadius: "999px",
    background: "rgba(46, 41, 41, 0.18)"
  }} />
        <span style={{
    marginLeft: "8px",
    color: "rgba(46, 41, 41, 0.58)",
    fontSize: "0.82rem",
    overflow: "hidden",
    textOverflow: "ellipsis",
    whiteSpace: "nowrap"
  }}>{label}</span>
      </div>
      <div className="hc-live-preview-clip">
        <iframe className="hc-live-preview-frame" src={url} title={label} loading="lazy" style={{
    margin: 0,
    maxWidth: "none"
  }} />
      </div>
      <div style={{
    padding: "12px 14px",
    borderTop: "1px solid rgba(46, 41, 41, 0.08)",
    background: "rgba(255, 255, 255, 0.72)"
  }}>
        <a href={url} target="_blank" rel="noreferrer">{linkLabel}</a>
      </div>
    </div>;
}

## Publish & Remix 如何運作

如果只是想讓別人查看一段對話、檔案或結果，用 **Share**。

如果想讓別人基於你的 Project 繼續編輯，用 **Publish**。Publish 會儲存一個可 Remix 的 Project 快照。拿到連結的人可以查看快照，也可以 **Remix** 成自己的可編輯 Project。

**Remix** 會從快照建立一個新的 Project。副本是獨立的，Remix 裡的修改不會影響原本的 Project。

你也可以 Remix 自己發布的快照，用來從一個穩定版本開始探索另一個方向。

## 什麼時候使用 Publish & Remix

* 想讓別人編輯或改造你的 Project
* 想儲存一個別人可以複製的穩定版本
* 想自己從目前版本探索另一個方向
* 想讓團隊或社群複用你的 Project

<Note>
  任何拿到發布連結的人都可以查看這個快照。發布前請檢查檔案、聊天記錄、權杖、密鑰和隱私資訊。
</Note>

## 發布快照

在 Project 右上角點擊 **Publish**。

<div style={{ borderRadius: '14px', border: '1px solid rgba(45, 36, 27, 0.12)', boxShadow: '0 18px 46px rgba(56, 38, 20, 0.09)', overflow: 'hidden', background: '#FFFFFF', marginBottom: '24px' }}>
  <div style={{ padding: '12px 16px', borderBottom: '1px solid rgba(45, 36, 27, 0.08)', background: '#FFFFFF' }}>
    <span style={{ display: 'block', color: '#2E2929', fontFamily: 'Instrument Serif, Georgia, "Times New Roman", serif', fontSize: '28px', fontWeight: 400, lineHeight: '1' }}>Publish</span>
    <span style={{ display: 'block', marginTop: '6px', color: '#8A8178', fontFamily: 'Instrument Serif, Georgia, "Times New Roman", serif', fontSize: '18px', fontWeight: 400, lineHeight: '1.2' }}>儲存一個可 Remix 的 Project 快照。</span>
  </div>

  <img src="https://mintcdn.com/happycapy/qu9DbeP3oO1Bbe3K/images/features/publish-snapshot.png?fit=max&auto=format&n=qu9DbeP3oO1Bbe3K&q=85&s=e295fcb80229d4704896f484304d4805" alt="Publish snapshot 面板" style={{ maxWidth: '100%', display: 'block', margin: '0 auto' }} width="1600" height="900" data-path="images/features/publish-snapshot.png" />
</div>

複製連結前，先選擇要包含的內容：

* **Include chat history** — 把對話記錄一起包含進快照
* **Files only** — 關閉聊天記錄，只發布 Project 檔案
* **Past snapshots** — 找回並重新分享之前發布過的連結

發布後複製連結，傳給需要查看或 Remix 這個快照的人。

<Tip>
  快照記錄的是發布那一刻的 Project 狀態。如果之後做了重要修改，需要重新 Publish 才能分享新版本。
</Tip>

## Remix 快照

打開一個已發布的快照，然後點擊 **Remix**。

<LivePreview url="https://happycapy.ai/snapshots/e4f0e3b2-a8c8-4c50-91df-0789f7017d37" label="happycapy.ai/snapshots/e4f0e3b2-a8c8-4c50-91df-0789f7017d37" linkLabel="打開快照" />

Happycapy 會把快照複製到你的工作空間，並作為新的 Project 打開。之後你可以修改檔案、繼續推進，或讓 Happycapy 沿另一個方向處理。

這份副本是獨立的：

* Remix 裡的修改不會影響原始 Project
* 原始 Project 後續的修改不會自動同步到已有 Remix
* 不同的人可以 Remix 同一個快照，並各自獨立工作
