Document emails.logo and emails.logo_width (bundle config)

已关闭 适合新手
#308 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1-3 小时
新手友好度
90/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
yaml
领域
documentation

调研方向

首先查看 content/4.api/ 中的 bundle 配置参考,并找到用户电子邮件设置。添加 silverback_api_components.emails.logo 和 logo_width,包括它们的默认值、Twig 路径行为、正整数约束以及 website_name 替代文本的更改。更新配置示例,并验证生成的参考是否与其他 bundle 设置一致。

由索引模型根据 Issue 内容生成。

描述

The API components bundle adds config for the logo at the top of every email it sends (user emails and the orphaned resources notification): components-web-app/api-components-bundle#576 (issue components-web-app/api-components-bundle#573).

To document in the bundle configuration reference (content/4.api/), near the user email settings:

  • silverback_api_components.emails.logo: a Twig path to the image (e.g. emails/logo.png for templates/emails/logo.png, or a namespaced @App/... path). Not a filesystem path: it is embedded through Twig's email.image(). Default: the bundle's CWA logo (@SilverbackApiComponents/assets/images/email_logo.png).
  • silverback_api_components.emails.logo_width: optional width in pixels (positive integer). Set it for a 2x (retina) image so it displays at half its pixel width; null shows the image at its own width (capped by the stylesheet's max-height: 140px).
  • The logo's alt text is now the site's website_name (it was Logo).
  • This replaces the workaround of overriding templates/bundles/SilverbackApiComponentsBundle/emails/_template.html.twig and the logo image.
silverback_api_components:
    emails:
        logo: emails/logo.png
        logo_width: 200
主要语言
TypeScript
星标
0
派生
0
平均合并
1 小时 20 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

components-web-app/docs 的其他 Issue

查看 components-web-app/docs 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。