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

Fermée
#301 3 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@piyusshhjangid y travaille déjà.

Depuis le 28/10/2026.

  • #303 par @piyusshhjangid — fusionnée

Évaluation

Cette issue n'a pas encore été évaluée.

Description

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.

Langage dominant
TypeScript
Étoiles
8
Forks
4
Merge moyen
8 h 19 min
PR mergées (30 j)
161

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de codercops/ogcops

Toutes les issues de codercops/ogcops

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.