mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-24 14:36:59 +02:00
refactor: fix a few places of path handling (#7023)
This commit is contained in:
parent
e6838dd7a6
commit
4957ec947b
7 changed files with 9 additions and 15 deletions
|
@ -9,7 +9,6 @@ import {Feed, type Author as FeedAuthor, type Item as FeedItem} from 'feed';
|
|||
import type {BlogPost} from './types';
|
||||
import {
|
||||
normalizeUrl,
|
||||
posixPath,
|
||||
mapAsyncSequential,
|
||||
readOutputHTMLFile,
|
||||
} from '@docusaurus/utils';
|
||||
|
@ -128,10 +127,7 @@ async function createBlogFeedFile({
|
|||
}
|
||||
})();
|
||||
try {
|
||||
await fs.outputFile(
|
||||
posixPath(path.join(generatePath, feedPath)),
|
||||
feedContent,
|
||||
);
|
||||
await fs.outputFile(path.join(generatePath, feedPath), feedContent);
|
||||
} catch (err) {
|
||||
throw new Error(`Generating ${feedType} feed failed: ${err}.`);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue