Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add the Benchmark blog template (`blog-benchmark`)

Đang mở
#301 3 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@piyusshhjangid đang làm issue này rồi.

Từ ngày 28/10/2026.

  • #303 của @piyusshhjangid — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

good first issue hacktoberfest templates

Part of #5. For posts that compare how fast (or how big) a few things are.

Idea
A small "Benchmark" label in the accent color at the top, the post title under it ("Bun vs Deno vs Node: HTTP throughput") with an optional one-line note ("Requests per second, higher is better"). Then up to four horizontal bars, one per row: the name on the left ("Bun"), the bar, and the number at the end ("112,000 req/s"). Every bar is scaled to the largest value, so the largest one fills its track and is drawn in the accent color, while the others use a muted color. The site name sits at the bottom.

Template details

  • File: src/templates/blog/benchmark.ts, id blog-benchmark
  • Fields: commonFields.title, commonFields.description (the note, optional), name1 to name4 (text, optional, defaults "Bun", "Deno", "Node" and blank), value1 to value4 (number, optional, defaults 112000, 71000, 48000 and blank), unit (text, optional, default "req/s"), commonFields.siteName, commonFields.bgColor, commonFields.accentColor, commonFields.textColor

Where to look

  • Closest reference: src/templates/github/language-bars.ts (rows of labeled bars), src/templates/blog/table-of-contents.ts (a short list where blank rows are skipped)

Acceptance criteria

  • Bars are scaled to the largest value, the largest is in the accent color, and the numbers show with thousands separators plus the unit when it's set
  • A row with a blank name, or a value that isn't a number of 0 or more, is skipped with no gap; all-zero values draw empty bars without dividing by zero; and with every row skipped the chart area hides cleanly
  • A long title, note or name shrinks with autoFontSize() and then truncates
  • The label and the accent bar stay readable on a light background
  • Re-exported in src/templates/blog/index.ts and registered in the blog 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 #301 in the description.

Ngôn ngữ chính
TypeScript
Star
8
Fork
4
Merge trung bình
8 giờ 19 phút
Pull request đã merge (30 ngày)
129

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của codercops/ogcops

Tất cả issue của codercops/ogcops

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.