Skip to content

fix(content-blog): fix wrong path variable in feed XSLT CSS file validation#11736

Merged
slorber merged 1 commit intofacebook:mainfrom
akshatsinha0:fix/blog-feed-xslt-css-path-validation
Feb 13, 2026
Merged

fix(content-blog): fix wrong path variable in feed XSLT CSS file validation#11736
slorber merged 1 commit intofacebook:mainfrom
akshatsinha0:fix/blog-feed-xslt-css-path-validation

Conversation

@akshatsinha0
Copy link
Copy Markdown
Contributor

Pre-flight checklist

  • I have read the Contributing Guidelines on pull
    requests
    .
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully
    verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000)
    and the maintainers have approved on my working plan.

Motivation

In resolveXsltFilePaths inside packages/docusaurus-plugin-content-blog/src/feed.ts, there are two
sequential existence checks:

  1. Line 202: checks if the XSLT file exists -- uses xsltAbsolutePath
  2. Line 216: checks if the co-located CSS file exists -- also uses xsltAbsolutePath

The 2nd check should use cssAbsolutePath. Because it rechecks the XSLT path (which already passed
the first check), the CSS validation never fails ;even when the CSS file is genuinely missing. The
downstream fs.copy(cssAbsolutePath, ...) at line 252 then crashes with an unhelpful filesystem error
instead of the err message that was written for this exact scenario.

Test Plan

1.)the logic is straightforward.
2.)The function is called once by generateXsltFiles (line 242), which destructures {xsltAbsolutePath, cssAbsolutePath} and copies both files. With this fix, a missing CSS file is now caught at validation
time with the intended error message instead of failing silently until the copy step.

Test links

N/A — no UI change.

Related issues/PRs

None - analyis of file

@meta-cla meta-cla bot added the CLA Signed Signed Facebook CLA label Feb 13, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 13, 2026

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 8210f72
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/698f556b49e8ac000855023f
😎 Deploy Preview https://deploy-preview-11736--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Feb 13, 2026
@slorber
Copy link
Copy Markdown
Collaborator

slorber commented Feb 13, 2026

thanks 👍

@slorber slorber merged commit 63d6f30 into facebook:main Feb 13, 2026
44 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants