{"record":{"id":"b6000c200a55c94e","repo":"facebook/docusaurus","slug":"blog-feed-xslt-file-was-found-at-path-path-relat","errorCode":null,"errorMessage":"Blog feed XSLT file was found at path=${path.relative(process.cwd(), xsltAbsolutePath)}\nBut its expected co-located CSS file could not be found at path=${path.relative(process.cwd(), cssAbsolutePath)}\nIf you want to provide a custom XSLT file, you must provide a CSS file with the exact same name.","messagePattern":"Blog feed XSLT file was found at path=(.+?)\nBut its expected co-located CSS file could not be found at path=(.+?)\nIf you want to provide a custom XSLT file, you must provide a CSS file with the exact same name\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/docusaurus-plugin-content-blog/src/feed.ts","lineNumber":217,"sourceCode":"    : ((await getDataFilePath({filePath: xsltFilePath, contentPaths})) ??\n      path.resolve(contentPaths.contentPath, xsltFilePath));\n\n  if (!(await fs.pathExists(xsltAbsolutePath))) {\n    throw new Error(\n      logger.interpolate`Blog feed XSLT file not found at path=${path.relative(\n        process.cwd(),\n        xsltAbsolutePath,\n      )}`,\n    );\n  }\n\n  const parsedPath = path.parse(xsltAbsolutePath);\n  const cssAbsolutePath = path.resolve(\n    parsedPath.dir,\n    `${parsedPath.name}.css`,\n  );\n  if (!(await fs.pathExists(cssAbsolutePath))) {\n    throw new Error(\n      logger.interpolate`Blog feed XSLT file was found at path=${path.relative(\n        process.cwd(),\n        xsltAbsolutePath,\n      )}\nBut its expected co-located CSS file could not be found at path=${path.relative(\n        process.cwd(),\n        cssAbsolutePath,\n      )}\nIf you want to provide a custom XSLT file, you must provide a CSS file with the exact same name.`,\n    );\n  }\n\n  return {xsltAbsolutePath, cssAbsolutePath};\n}\n\nasync function generateXsltFiles({\n  xsltFilePath,\n  generatePath,","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/facebook/docusaurus/blob/3f483e80e326cc646b54b83d564b3f0c4881b9a6/packages/docusaurus-plugin-content-blog/src/feed.ts#L199-L235","documentation":"Thrown by getXsltFile when the XSLT file exists but its expected co-located CSS file (same basename, .css extension in the same directory) does not. The plugin requires both files to be provided together so the feed styling stays self-contained.","triggerScenarios":"You supply feedOptions.xslt pointing to foo.xslt, but foo.css does not sit next to it. fs.pathExists(cssAbsolutePath) returns false.","commonSituations":"Renamed the .xslt file and forgot to rename the .css, only committed the xslt, or split the files into different directories.","solutions":["Create a CSS file with the exact same basename as the XSLT in the same directory.","If you renamed the xslt, rename the css to match.","Re-run the build to confirm both files are now found."],"exampleFix":"# before: blog/rss.xslt exists, blog/rss.css missing\n# after: also create blog/rss.css containing the feed styles","handlingStrategy":"validation","validationCode":"import path from 'path';\nimport fs from 'fs-extra';\nconst {dir, name} = path.parse(xsltAbs);\nconst cssAbs = path.join(dir, `${name}.css`);\nif (!(await fs.pathExists(cssAbs))) throw new Error(`Co-located CSS missing: ${cssAbs}`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always create the .css at the same time you create or rename the .xslt.","Treat the xslt+css pair as one unit in version control."],"tags":["blog","feed","xslt","css","filesystem"],"backgroundTag":null,"analyzedSha":"3f483e80e326cc646b54b83d564b3f0c4881b9a6","analyzedAt":"2026-08-12T13:25:04.382Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}