Add new card-style OG image templates
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- design
调研方向
This is a tracker: pick one of the linked template issues (#60 to #73), comment there to get assigned, then work from the steps here. Each template goes in src/templates/{category}/{name}.ts, is re-exported from that category's index.ts, and is added to the array in src/templates/registry.ts, with shared fields from src/templates/utils.ts. Done means the template renders in the /create/{category} editor preview, passes npm run check and npm run test, and the PR to dev includes a screenshot and Closes #<issue>.
由索引模型根据 Issue 内容生成。
描述
This is the tracker for new templates this Hacktoberfest. Each idea below has its own issue, so pick one, comment on that issue to get assigned, and build it.
Template issues
- #60 Add the Series Part blog template (
blog-series-part) - #61 Add the Blog Summary Card template (
blog-summary-card) - #62 Add the Open to Work developer template (
developer-open-to-work) - #63 Add the Coupon Code e-commerce template (
ecommerce-coupon-code) - #64 Add the Event Agenda template (
event-agenda) - #65 Add the GitHub Issue Card template (
github-issue-card) - #66 Add the Contributors Wall template (
github-contributors-wall) - #67 Add the Open Roles job template (
job-open-roles) - #68 Add the Subscribe Card newsletter template (
newsletter-subscribe-card) - #69 Add the Conversation podcast template (
podcast-conversation) - #70 Add the Shortcut Tip product template (
product-shortcut-tip) - #71 Add the Sticky Note quote template (
quote-sticky-note) - #72 Add the Uptime Status SaaS template (
saas-uptime-status) - #73 Add the Quiz Card tutorial template (
tutorial-quiz-card)
Check your template in the editor's live preview, and with the Download PNG button too: the preview renders in the browser and the download renders on the server.
How to add a template
- Create
src/templates/{category}/{name}.tsdefault-exporting aTemplateDefinition. The id must be{category}-{name}(for example,blog/minimal-dark.tshas idblog-minimal-dark). - Re-export it in
src/templates/{category}/index.ts. - Import it and add it to the category's array in
src/templates/registry.ts(append at the end of the block). - Run
npm run dev, openhttp://localhost:4321/create/{category}, pick your template, and try long text and empty optional fields. - Run
npm run checkandnpm run test. You do not need to update README counts.
Template checklist
- Root element is
width: '1200px', height: '630px' - Every
divhasdisplay: 'flex', inline styles only, flexbox only (no grid) - Fonts: Inter (400/500/600/700), Playfair Display (400/700), JetBrains Mono (400/700)
- No emoji or remote images in defaults (no emoji font is bundled)
- Long text handled with
truncate()/autoFontSize(); empty optional fields are hidden cleanly - Still readable on a light background: try
bgColor#ffffffwith a darktextColor. If the template mixes its own colors (chips, badges, muted text),isLightColor()insrc/templates/utils.tshelps pick ones that work on both - Number and toggle params parsed defensively, since API values arrive as strings:
Number(params.x),params.x === true || params.x === 'true' - No
Math.random()or dates inrender(images are cached, so output must be deterministic) - Clear
descriptionand 4 to 6tags(used by the editor search and the AI template search) - Reuse
commonFieldsfromsrc/templates/utils.tswhere possible - PR targets
dev, includes a screenshot, saysCloses #<issue>, and fills in the "How I Tested This" and "AI Assistance" sections
Have another idea? Open a template request and mention it here.
- 主要语言
- TypeScript
- 星标
- 8
- 派生
- 4
- 平均合并
- 6 小时 9 分钟
- 30 天内合并 PR
- 66
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codercops/ogcops 的其他 Issue
-
accessibility bug good first issue hacktoberfest ui
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
accessibility bug good first issue hacktoberfest
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
bug good first issue hacktoberfest ui
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
bug good first issue hacktoberfest
难度 2/5 1-3 小时 新手友好度 88/100
codercops/ogcops#167 · 1 条评论 ·
维护者通常 1 天内回复
-
An empty `imageUrl=`, `logoUrl=` or `template=` returns an error instead of the default可能已有人在做 @Saifjafri212213 今天认领。 未关闭bug good first issue hacktoberfest
难度 2/5 1-3 小时 新手友好度 88/100
codercops/ogcops#166 · 1 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
phivk/rubiks-lab#33 ·
维护者通常 1 天内回复
-
BUG:Edit Album strips spaces from the password so albums with a leading/trailing space in the password can't be edited可能已有人在做 @ManyaJain111 今天认领。 未关闭bug enhancement possible-duplicate
难度 2/5 1-3 小时 新手友好度 77/100
AOSSIE-Org/PictoPy#1637 · 4 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
chaitin/MonkeyCode#1437 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
area:cards enhancement migration ready-for-agent
难度 2/5 1-3 小时 新手友好度 70/100
fil-donadoni/tolaria#6309 ·
维护者通常 1 天内回复