-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Conversation
🦋 Changeset detectedLatest commit: 6d39c91 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -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)}`); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bluwy updated.
As far as I can tell the failed test feels like a flake? Will check back when I update the PR |
@silent1mezzo No, we don't have many tests for the CLI, so a local test with possible snapshots is a very welcome alternative :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think no tests for this is fine. It's usually hard to test it reliably.
Thanks for picking up this suggestion @silent1mezzo! |
Changes
This changes the CLI output from
@astrojs/sitemap: 'sitemap-index.xml' is created
to@astrojs/sitemap: 'sitemap-index.xml' created at '{OUTPUT DIRECTORY}'
Testing
The CLI output isn't tested anywhere (as far as I could tell).
Docs
The CLI output isn't mentioned in the docs (as far as I could tell) so there's nothing that needs updating.