Skip to content

Split blog posts to one sentence per line and enforce it - #39

Open
madolson wants to merge 8 commits into
mainfrom
sentence-per-line-lint
Open

madolson wants to merge 8 commits into
mainfrom
sentence-per-line-lint

Conversation

@madolson

@madolson madolson commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Rule 1 of the blog guide asks for one sentence per line, so a review suggestion can target a single sentence. This PR splits the 1,007 lines that hold more than one sentence across 66 existing posts, and adds a workflow that runs madolson/sentence-per-line on blog PRs and fails when a changed post has such a line. The rewrite changes only whitespace, and the built site is identical apart from whitespace.

AI generated details

The rewrite

f4e852a is mechanical: sentence_per_line.py --fix content/blog from the action at v1.0.0.

  • Source: in all 66 files, before and after are the same text once whitespace is removed, except for > at the start of new blockquote lines. A second --fix changes nothing, and a check afterward is clean.
  • Render: the "Deploy website" artifacts from before (fc0cddf) and after (fd97281) each have 2,005 files. 1,938 are byte-identical. The other 67 (65 posts, atom.xml and search_index.en.js) match once whitespace is collapsed. Every <pre>, <code> and <textarea> block is byte-identical.
  • The one post the build skips, 2026-11-24-valkey-large-object-module (draft = true), renders the same under markdown-it-py, and its 58 code blocks are byte-identical.
  • Splits: two independent reviewers read all 1,820 split points and found none that lands mid-sentence. Correct close calls include "is Snap Inc. Over time", a quoted keynote title that ends a sentence, and > **Wait! How do both ...?**, where the bold now spans two lines and still renders bold. Bold lead-ins such as **Keep memory usage small.** are split from the sentence after them, as the rule says.

The check

scope: changed-files checks every line of each post a PR adds or changes. Posts a PR doesn't touch are skipped, so a post that slips in without the check doesn't fail unrelated PRs. A throwaway PR (#43) that added a two-sentence line failed, with an annotation on that line. On this PR, the check passes on all 66 rewritten posts.

GitHub shows at most 10 annotations of each level per step. The job summary lists every violation.

Decisions for the reviewer

  1. Timing. This touches 66 posts, and open blog PRs that add multi-sentence lines will fail on their next run. Proposal: merge when few blog PRs are open.
  2. Where the action lives. It is in a personal repo, pinned by SHA. Proposal: move it to valkey-io before promoting this, or keep the SHA pin.
  3. The guide still suggests the sed one-liner. Proposal: a follow-up pointing it at the action's CLI, now that authors need a fixer.

This was generated by AI but verified, with love, by a human.

@github-actions

Copy link
Copy Markdown

The workflow added next runs it as an action, so the script, its tests and the guide change come back out.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
@madolson madolson changed the title Add a one-sentence-per-line checker for blog posts Check blog PRs for lines with more than one sentence Nov 30, 2026
@madolson madolson added the needs-review Staged work waiting on madolson's review label Nov 30, 2026
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Mechanical: sentence_per_line.py --fix content/blog from madolson/sentence-per-line v1.0.0. Only whitespace changes, plus > on new blockquote lines.
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
@madolson madolson changed the title Check blog PRs for lines with more than one sentence Split blog posts to one sentence per line and enforce it Nov 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Staged work waiting on madolson's review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants