Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added OUTPUT dir to sitemap build command #8824

Merged
merged 5 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/funny-deers-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/sitemap': patch
---

Added OUTPUT directory to the sitemap build command
bluwy marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion packages/integrations/sitemap/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const createPlugin = (options?: SitemapOptions): AstroIntegration => {
limit: entryLimit,
gzip: false,
});
logger.success(`\`${OUTFILE}\` is created.`);
logger.success(`\`${OUTFILE}\` created at \`${fileURLToPath(dir)}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can extract fileURLToPath(dir) as its own variable, and maybe we can also do path.relative(process.cwd(), destDir) so that the logged path is shorter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bluwy updated.

} catch (err) {
if (err instanceof ZodError) {
logger.warn(formatConfigErrorMessage(err));
Expand Down
Loading