Add the Do and Don't tutorial template (`tutorial-do-dont`)

未关闭
#355 2 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@Ravindar-Amogh-Gummadavelly 已经在做这个了。

开始于 2026年10月31日。

评估

这个 Issue 还没有评估数据。

描述

good first issue templates

Part of #5. For tips posts that show the right way and the wrong way side by side.

Idea
The title at the top ("Writing commit messages"), then two columns: "Do" on the left with up to three items ("Use the imperative mood", "Keep the subject under 50 characters", "Explain why in the body") and "Don't" on the right with up to three items ("End the subject with a period", "Mix unrelated changes", "Write fixed stuff"). The "Do" heading is green and the "Don't" heading is red, each item sits on its own row, and the site name is at the bottom.

Template details

  • File: src/templates/tutorial/do-dont.ts, id tutorial-do-dont
  • Fields: commonFields.title, do1 to do3 (text, optional, defaults above), dont1 to dont3 (text, optional, defaults above), commonFields.siteName, commonFields.bgColor, commonFields.accentColor, commonFields.textColor

Where to look

  • Closest reference: src/templates/tutorial/before-after.ts (two columns side by side), src/templates/tutorial/prerequisites.ts (a short list where blank items are skipped)

Acceptance criteria

  • Blank items (or only spaces) are skipped with no gap; a column with every item blank hides and the other one takes the full width; with both empty the area hides cleanly
  • A long title shrinks with autoFontSize() and then truncates, and a long item wraps to at most two lines and then truncates inside its column
  • The green and red headings and any accent text stay readable on a light background
  • Re-exported in src/templates/tutorial/index.ts and registered in the tutorial block of src/templates/registry.ts
  • Meets the shared template checklist in #5

One template per contributor at a time, so more people get a chance.


Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #NUM in the description.

主要语言
TypeScript
星标
8
派生
4
平均合并
8 小时 47 分钟
30 天内合并 PR
157

环境准备

从这里开始

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

codercops/ogcops 的其他 Issue

查看 codercops/ogcops 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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