Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
  • Loading branch information
ematipico and sarah11918 authored Mar 8, 2023
1 parent 082d7c2 commit 2651581
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion .changeset/popular-rules-divide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

Added `trailingSlash` option, to control whether the emitted URLs should have the trailing slash.

The new option is optional.

```js
import rss from '@astrojs/rss';
Expand Down
7 changes: 3 additions & 4 deletions packages/astro-rss/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ export function get(context) {
customData: '<language>en-us</language>',
// (optional) add arbitrary metadata to opening <rss> tag
xmlns: { h: 'http://www.w3.org/TR/html4/' },
// (optional) add or not the trailing slash
trailingSlash: "never"
// (optional) add trailing slashes to URLs (default: true)
trailingSlash: false
});
}
```
Expand Down Expand Up @@ -240,8 +240,7 @@ export async function get(context) {
Type: `boolean (optional)`
Default: "always"

By default, the library will add trailing slashes to the emitted URLs. To change this behaviour,
you use this option, by passing the value `false`.
By default, the library will add trailing slashes to the emitted URLs. To prevent this behavior, add `trailingSlash: false` to the `rss` function.

```js
import rss from '@astrojs/rss';
Expand Down

0 comments on commit 2651581

Please sign in to comment.