add-expert

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Steps

步骤

  1. Add the expert's photo to both:
    • packages/docs/static/img/freelancers/<firstname>.png
    • packages/promo-pages/public/img/freelancers/<firstname>.png
    The image should be a square headshot (PNG format). Both paths must have the same file.
  2. Add an entry to the
    experts
    array in
    packages/promo-pages/src/components/experts/experts-data.tsx
    :
    tsx
    {
        slug: 'firstname-lastname',
        name: 'First Last',
        image: '/img/freelancers/<firstname>.png',
        website: 'https://example.com' | null,
        x: 'twitter_handle' | null,
        github: 'github_username' | null,
        linkedin: 'in/linkedin-slug/' | null,
        email: 'email@example.com' | null,
        videocall: 'https://cal.com/...' | null,
        since: new Date('YYYY-MM-DD').getTime(),
        description: (
            <div>
                A short description of the expert's work and specialties.
                Links to projects can be included with <a> tags.
            </div>
        ),
    },
    • since
      should be set to today's date
    • slug
      must be lowercase, hyphenated version of the name
    • Set unused social fields to
      null
    • The entry goes at the end of the
      experts
      array (before the closing
      ]
      )
  3. Render the expert card by running in
    packages/docs
    :
    bun render-cards
    This generates
    packages/docs/static/generated/experts-<slug>.png
    . Verify it says "Rendered experts-<slug>" (not "Existed").
  1. 添加专家照片至以下两个位置:
    • packages/docs/static/img/freelancers/<firstname>.png
    • packages/promo-pages/public/img/freelancers/<firstname>.png
    图片应为方形头像(PNG格式)。两个路径下的文件必须完全一致。
  2. 添加条目
    packages/promo-pages/src/components/experts/experts-data.tsx
    中的
    experts
    数组:
    tsx
    {
        slug: 'firstname-lastname',
        name: 'First Last',
        image: '/img/freelancers/<firstname>.png',
        website: 'https://example.com' | null,
        x: 'twitter_handle' | null,
        github: 'github_username' | null,
        linkedin: 'in/linkedin-slug/' | null,
        email: 'email@example.com' | null,
        videocall: 'https://cal.com/...' | null,
        since: new Date('YYYY-MM-DD').getTime(),
        description: (
            <div>
                一段关于该专家工作内容和专长的简短描述。
                可以使用<a>标签添加项目链接。
            </div>
        ),
    },
    • since
      应设为当前日期
    • slug
      必须是姓名的小写连字符形式
    • 将未使用的社交字段设为
      null
    • 条目需添加至
      experts
      数组的末尾(在闭合
      ]
      之前)
  3. 渲染专家卡片,在
    packages/docs
    目录下运行:
    bun render-cards
    此命令会生成
    packages/docs/static/generated/experts-<slug>.png
    。请验证输出显示“Rendered experts-<slug>”(而非“Existed”)。