google-sites

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Google Sites Skill

Google Sites 技能

Overview

概述

Claude can create and manage Google Sites to build simple websites, team portals, and project pages. This includes adding content, embedding media, and publishing sites.
Claude可以创建和管理Google Sites,用于搭建简单网站、团队门户和项目页面。这包括添加内容、嵌入媒体以及发布网站。

Quick Install

快速安装

bash
curl -sSL https://canifi.com/skills/google-sites/install.sh | bash
Or manually:
bash
cp -r skills/google-sites ~/.canifi/skills/
bash
curl -sSL https://canifi.com/skills/google-sites/install.sh | bash
或者手动安装:
bash
cp -r skills/google-sites ~/.canifi/skills/

Setup

配置

Configure via canifi-env:
bash
undefined
通过canifi-env进行配置:
bash
undefined

First, ensure canifi-env is installed:

首先,确保已安装canifi-env:

canifi-env set GOOGLE_EMAIL "your-email@gmail.com"
undefined
canifi-env set GOOGLE_EMAIL "your-email@gmail.com"
undefined

Privacy & Authentication

隐私与认证

Your credentials, your choice. Canifi LifeOS respects your privacy.
你的凭证,由你掌控。 Canifi LifeOS尊重你的隐私。

Option 1: Manual Browser Login (Recommended)

选项1:手动浏览器登录(推荐)

If you prefer not to share credentials with Claude Code:
  1. Complete the Browser Automation Setup using CDP mode
  2. Login to the service manually in the Playwright-controlled Chrome window
  3. Claude will use your authenticated session without ever seeing your password
如果你不想与Claude Code共享凭证:
  1. 使用CDP模式完成浏览器自动化配置
  2. 在Playwright控制的Chrome窗口中手动登录该服务
  3. Claude将使用你的已认证会话,且永远不会看到你的密码

Option 2: Environment Variables

选项2:环境变量

If you're comfortable sharing credentials, you can store them locally:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
如果你愿意共享凭证,可以将其存储在本地:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
注意:存储在canifi-env中的凭证仅能在你的本地机器上访问,绝不会被传输。

Capabilities

功能特性

  • Create new sites from scratch or templates
  • Add and edit pages
  • Insert text, images, and videos
  • Embed Google Drive files
  • Add navigation and menus
  • Apply themes and customize design
  • Publish and unpublish sites
  • Share editing permissions
  • Create internal links
  • Embed forms and calendars
  • Set custom domains
  • Manage site structure
  • 从 scratch 或模板创建新网站
  • 添加和编辑页面
  • 插入文本、图片和视频
  • 嵌入Google Drive文件
  • 添加导航和菜单
  • 应用主题并自定义设计
  • 发布和下架网站
  • 分享编辑权限
  • 创建内部链接
  • 嵌入表单和日历
  • 设置自定义域名
  • 管理网站结构

Usage Examples

使用示例

Example 1: Create Site

示例1:创建网站

User: "Create a site for our team project"
Claude: Creates new site titled "Team Project", adds home page
        with project overview section. Returns: "Site created: [preview link]"
用户:"为我们的团队项目创建一个网站"
Claude:创建标题为“团队项目”的新网站,添加包含项目概述部分的主页。返回:"网站已创建:[预览链接]"

Example 2: Add Page

示例2:添加页面

User: "Add a 'Resources' page to the team site"
Claude: Opens site, adds new page "Resources" to navigation.
        Confirms: "Added Resources page to site"
用户:"为团队网站添加一个'资源'页面"
Claude:打开网站,将新页面“资源”添加到导航中。确认:"已为网站添加资源页面"

Example 3: Embed Content

示例3:嵌入内容

User: "Embed our project timeline spreadsheet on the home page"
Claude: Inserts Google Sheets embed with timeline.
        Confirms: "Timeline spreadsheet embedded on home page"
用户:"将我们的项目时间线电子表格嵌入到主页"
Claude:插入包含时间线的Google Sheets嵌入。确认:"时间线电子表格已嵌入主页"

Example 4: Publish Site

示例4:发布网站

User: "Make the team site public"
Claude: Opens publishing settings, configures visibility.
        Reports: "Site published at: sites.google.com/view/team-project"
用户:"将团队网站设为公开"
Claude:打开发布设置,配置可见性。报告:"网站已发布至:sites.google.com/view/team-project"

Authentication Flow

认证流程

  1. Claude navigates to sites.google.com via Playwright MCP
  2. Authenticates with GOOGLE_EMAIL if needed
  3. Handles 2FA if prompted (notifies user via iMessage)
  4. Maintains session for subsequent Sites operations
  1. Claude通过Playwright MCP导航至sites.google.com
  2. 如有需要,使用GOOGLE_EMAIL进行认证
  3. 若提示两步验证,将通过iMessage通知用户
  4. 维持会话以进行后续的Sites操作

Selectors Reference

选择器参考

javascript
// Create site
'[aria-label="Create new site"]'

// Site title
'.docs-title-input'

// Insert menu
'[aria-label="Insert"]'

// Pages panel
'[aria-label="Pages"]'

// Add page
'[aria-label="Add page"]'

// Text box
'[aria-label="Text box"]'

// Image button
'[aria-label="Images"]'

// Embed button
'[aria-label="Embed"]'

// Drive embed
'[aria-label="Google Drive"]'

// Theme button
'[aria-label="Themes"]'

// Preview button
'[aria-label="Preview"]'

// Publish button
'[aria-label="Publish"]'

// Share button
'[aria-label="Share with others"]'
javascript
// 创建网站
'[aria-label="Create new site"]'

// 网站标题
'.docs-title-input'

// 插入菜单
'[aria-label="Insert"]'

// 页面面板
'[aria-label="Pages"]'

// 添加页面
'[aria-label="Add page"]'

// 文本框
'[aria-label="Text box"]'

// 图片按钮
'[aria-label="Images"]'

// 嵌入按钮
'[aria-label="Embed"]'

// Drive嵌入
'[aria-label="Google Drive"]'

// 主题按钮
'[aria-label="Themes"]'

// 预览按钮
'[aria-label="Preview"]'

// 发布按钮
'[aria-label="Publish"]'

// 分享按钮
'[aria-label="Share with others"]'

Embeddable Content

可嵌入内容

Google Docs
Google Sheets
Google Slides
Google Forms
Google Calendar
Google Maps
YouTube videos
Google Drive files
External URLs (via iframe)
Google Docs
Google Sheets
Google Slides
Google Forms
Google Calendar
Google Maps
YouTube 视频
Google Drive 文件
外部URL(通过iframe)

Error Handling

错误处理

  • Login Failed: Retry 3 times, notify user via iMessage
  • Session Expired: Re-authenticate automatically
  • Site Creation Failed: Check storage quota, retry
  • Embed Failed: Verify file permissions, try alternative embed
  • Publish Failed: Check domain settings, verify permissions
  • Theme Apply Failed: Retry, suggest alternative themes
  • 登录失败:重试3次,通过iMessage通知用户
  • 会话过期:自动重新认证
  • 网站创建失败:检查存储配额,重试
  • 嵌入失败:验证文件权限,尝试替代嵌入方式
  • 发布失败:检查域名设置,验证权限
  • 主题应用失败:重试,建议替代主题

Self-Improvement Instructions

自我改进说明

When you learn a better way to accomplish a task with Google Sites:
  1. Document the improvement in your response
  2. Suggest updating this skill file with the new approach
  3. Include specific design tips for better sites
  4. Note any new embed options or features
当你掌握了使用Google Sites完成任务的更好方法时:
  1. 在响应中记录改进点
  2. 建议使用新方法更新此技能文件
  3. 包含优化网站的具体设计技巧
  4. 记录任何新的嵌入选项或功能

Notes

注意事项

  • Sites auto-save all changes
  • Custom domains require verification
  • Sites are responsive by default
  • Maximum pages: no hard limit, but navigation may be affected
  • Files embedded from Drive inherit sharing settings
  • Published sites indexed by Google Search
  • Version history available
  • Multiple editors can collaborate simultaneously
  • Banner images recommended: 1600 x 400 pixels
  • Sites integrate with Google Analytics
  • 网站会自动保存所有更改
  • 自定义域名需要验证
  • 网站默认支持响应式设计
  • 页面数量上限:无硬性限制,但可能影响导航体验
  • 从Drive嵌入的文件继承共享设置
  • 已发布的网站会被Google搜索收录
  • 支持版本历史记录
  • 多位编辑者可同时协作
  • 推荐横幅图片尺寸:1600 x 400像素
  • 网站可与Google Analytics集成