Skip to content

fix(next): render all authors in blog post byline (#2098) - #2129

Open
basantjamwal wants to merge 2 commits into
apache:masterfrom
basantjamwal:fix-multiple-authors-2098
Open

basantjamwal wants to merge 2 commits into
apache:masterfrom
basantjamwal:fix-multiple-authors-2098

Conversation

@basantjamwal

Copy link
Copy Markdown

Fixes: #2098

Changes:

Blog posts with more than one author only showed the first author in the byline (for example, the 3.16.0 release post showed only "Abhishek Choudhary": https://apisix.apache.org/blog/2026/04/07/release-apache-apisix-3.16.0/). The cause was in the Astro site: next/src/lib/content.ts read only authors[0]?.name from the front-matter, so the other authors were dropped before the layout rendered them.

  • next/src/lib/content.ts
    • Added an authorNames() helper that returns every author name from author or from all entries of authors (object entries with a name, or plain strings).
    • blogPost() now sets author to all names joined with commas (used by the byline and post cards) and adds a new authors array to Post.
    • Added authors?: string[] to the Post interface.
  • next/src/layouts/Article.astro
    • The BlogPosting JSON-LD now lists every author as its own Person. Posts without an authors list keep the previous fallbacks (a single Person, or the Apache APISIX Organization).

The change is limited to dated blog posts. Other post types are unchanged.

Screenshots of the change:

Screenshot 2026-09-24 022812

Before (live site): only the first author is shown.

After (local build, npm run dev): Apr 7, 2026 · Abhishek Choudhary, Traky Deng · 8 min read

Testing:

  • Ran npm run dev in next/ and checked /blog/2026/04/07/release-apache-apisix-3.16.0/ and its /zh/ version.
  • Checked that the page source contains one Person entry per author in the JSON-LD.

@yzeng25

yzeng25 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

@basantjamwal thanks for this pr, could you solve the failing check?

@basantjamwal

Copy link
Copy Markdown
Author

@yzeng25 Thanks for checking! I looked into the failing check — it's unrelated to this PR.

Root cause: config/apisix-versions.js lists 3.18 as the latest series, so CI syncs docs from the release/3.18 branch of apache/apisix. APISIX 3.19.0 has since been released, and the three missing pages (openapi-to-mcp, websocket-proxy, proxy-localai) were added after 3.18 — so they don't exist on that branch yet.

This PR only touches blog author rendering (content.ts, Article.astro), so the doc sync is a separate, pre-existing issue.

Happy to open a separate issue/PR to bump apisix-versions.js to 3.19, or include it here if you'd prefer. Let me know which you'd like.

@yzeng25

yzeng25 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

@yzeng25 Thanks for checking! I looked into the failing check — it's unrelated to this PR.

Root cause: config/apisix-versions.js lists 3.18 as the latest series, so CI syncs docs from the release/3.18 branch of apache/apisix. APISIX 3.19.0 has since been released, and the three missing pages (openapi-to-mcp, websocket-proxy, proxy-localai) were added after 3.18 — so they don't exist on that branch yet.

This PR only touches blog author rendering (content.ts, Article.astro), so the doc sync is a separate, pre-existing issue.

Happy to open a separate issue/PR to bump apisix-versions.js to 3.19, or include it here if you'd prefer. Let me know which you'd like.

@basantjamwal , try include in here and see if this can fix the failed ci.

@basantjamwal

basantjamwal commented Oct 8, 2026 •

Copy link
Copy Markdown
Author

@yzeng25 Done — bumped config/apisix-versions.js to include 3.19.

Verified locally that the three previously missing doc pages now sync and build correctly with this change.

@basantjamwal

basantjamwal commented Oct 9, 2026 •

Copy link
Copy Markdown
Author

@yzeng25 The 3.19 bump fixed the doc-parity check, but broke a different job: "Assert canonical contract". That test hardcodes version-specific assumptions (e.g. which version is next vs latest) that shifted once 3.19 became newest.

Since you'd like this included here, I'll keep working on it — but I don't want to guess-fix that test's logic without understanding it fully. Could you guide me on what should change?

@yzeng25

yzeng25 commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

@yzeng25 The 3.19 bump fixed the doc-parity check, but broke a different job: "Assert canonical contract". That test hardcodes version-specific assumptions (e.g. which version is next vs latest) that shifted once 3.19 became newest.

Since you'd like this included here, I'll keep working on it — but I don't want to guess-fix that test's logic without understanding it fully. Could you guide me on what should change?

@basantjamwal I'm not familiar with this either, but i think some of the other Commiters/PMCs would be able to help you out. cc @guoqqqi @kayx23 @Baoyuantop PTAL

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Site]: Blog posts front-matter / layout does not support rendering multiple authors

2 participants