Skip to content

Add a style guide to the blog contributing doc - #623

Closed
madolson wants to merge 10 commits into
valkey-io:mainfrom
madolson:blog-style-guide
Closed

Add a style guide to the blog contributing doc#623
madolson wants to merge 10 commits into
valkey-io:mainfrom
madolson:blog-style-guide

Conversation

@madolson

@madolson madolson commented Aug 1, 2026

Copy link
Copy Markdown
Member

Adds a How to write it subsection to Step 2 of the blog contributing guide.
It captures the style guidance reviewers already apply, so contributors can see it before the first review round rather than during it.

The one rule with a functional reason behind it is one sentence per line.
Markdown joins the lines back into a paragraph, so nothing changes about how a post renders.
It changes review: GitHub anchors suggestions to lines, so a reviewer can rewrite a single sentence instead of restating the whole paragraph, and two reviewers touching different sentences don't conflict.

The rest covers weasel words, checkable claims, benchmarking on stock Valkey, crediting contributors, marketing voice, active voice, headings, inclusive terminology, and formatting conventions.
The section follows its own guidance, so its source doubles as an example.

madolson added 10 commits July 31, 2026 11:53
Adds an hourly workflow that releases blog posts marked draft = true once
their frontmatter date has passed, by removing the draft line and committing
to main. This lets maintainers merge posts ahead of time without them going
live immediately.

Uses Zola's native draft support, so pending posts are excluded from the
build, blog listing, sitemap, and RSS feed until released. The workflow
pushes with the valkeyrie-bot app token so the existing deploy workflow
triggers on the resulting commit.

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

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
- Scope the app token with permission-contents: write, since the workflow
  permissions block only constrains GITHUB_TOKEN.
- Stage content/blog directly instead of piping paths through xargs, which
  splits on whitespace and would break on filenames containing spaces.
- Read and write with newline="" so CRLF-authored posts keep their line
  endings and produce a one-line diff. content/blog already contains one
  CRLF file, which previously would have been rewritten whole. Also strip
  the resulting lone trailing carriage return before parsing, which tomllib
  rejects.

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

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Parse frontmatter entirely with tomllib. The regex module is no longer
imported: the fences are found by string search, and each candidate line is
validated by tomllib itself, which is what authoritatively distinguishes the
real top-level 'draft = true' from one in a table, a comment, or a string.
Quoted date values are re-parsed as bare TOML instead of a strptime loop, so
both forms follow identical rules. This also fixes two files the regex
mishandled: a post with a leading blank line before the fence, and one with
a multi-line array in its frontmatter.

Publish once a day at 16:00 UTC (08:00 PST / 09:00 PDT) instead of hourly.
Posts are conventionally dated 00:00:00 or 01:01:01, so an hourly job would
have published them in the middle of the night PT.

Document that dates are UTC and that the time of day in 'date' does not
control publication, and drop the suggestion that work-in-progress can be
parked on main.

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

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
The publish job ignores the time of day, so a bare date is the clearer
convention. 16 posts already use one.

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

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
This was generated by AI but verified, with love, by a human.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
The line-scan approach had a real bug: a 'draft = true' inside a multi-line
string was removed instead of the actual key, corrupting the value and
leaving the post a draft. 8 existing posts use multi-line frontmatter
values, so this was reachable. Now a candidate line is removed and the
result re-parsed, accepting the edit only if it drops 'draft' and changes
nothing else.

Invalid TOML, a missing date, and an unparseable date now exit non-zero
instead of warning and skipping. 'zola build' already fails on bad TOML,
so there is no reason to accept it quietly here.

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

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
tomlkit is a round-trip TOML parser, so 'del frontmatter["draft"]' replaces
the hand-rolled line scanning and the remove-then-re-parse verification.
Reading the key directly only sees the top-level table, so the table-header
scan is gone too, along with the multi-line-value corruption it was working
around.

Verified tomlkit round-trips all 59 existing posts byte-identically, and
preserves comments and CRLF endings. Adds a pip install step; tomlkit is
MIT with no dependencies.

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

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
This was generated by AI but verified, with love, by a human.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
A post dated 2026-07-31 23:00:00 was held until the next day even though
the docs say the time of day is ignored. Compare date() values instead,
converting offset-aware datetimes to UTC first.

Also align the frontmatter comment with the scheduling section: date is the
publish date, not the day writing started.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Adds a 'How to write it' subsection to Step 2, matching the format of
the existing tips list.

The one-sentence-per-line rule is the functional one: GitHub anchors
review suggestions to lines, so a paragraph written as a single long
line forces every suggestion to restate the whole paragraph.

The doc follows its own guidance.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
@madolson
madolson requested a review from pnbrown August 1, 2026 00:10
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c423734c-f54e-4e80-acb3-3575a5f30c28

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@madolson

madolson commented Aug 1, 2026

Copy link
Copy Markdown
Member Author

Superseded by #624, which has only the style guide commit. This branch was cut from the wrong base and picked up the scheduled-publishing work from #622.

@madolson madolson closed this Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant