Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
KishiTheMechanic committed Nov 4, 2024
1 parent 7dfb212 commit 17b31d7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 22 deletions.
31 changes: 10 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,20 @@ languages and a default language without a language prefix.

```typescript
// Example usage
await saveSitemapAndRobots(
`https://${appInfo.domain}`,
'./routes',
'./articles',
'./static/sitemap.xml',
'./static/robots.txt',
{ languages: ['en', 'ja'], defaultLanguage: 'en' },
)
await saveSitemapAndRobots({
basename: `https://${appInfo.domain}`,
distDirectory: 'routes',
postsDirectory: 'posts',
sitemapPath: 'static/sitemap.xml',
robotsPath: 'static/robots.txt',
options: { languages: ['en', 'ja'], defaultLanguage: 'en' },
})
```

3. **Options**
**Options**

- `include`: Glob pattern for including files.
- `exclude`: Glob pattern for excluding files.
- `languages`: Array of languages, such as `["en", "ja"]`.
- `defaultLanguage`: Language that doesn’t require a prefix in the URL.

## API Reference

- **saveSitemap**(basename: `string`, distDirectory: `string`,
articlesDirectory: `string`, outputPath: `string`, options: `SiteMapOptions`)
- Generates a sitemap and saves it to the specified file path.
- `defaultLanguage`: Default Language.

## Contributing

Expand All @@ -70,6 +62,3 @@ The package is available as open source under the terms of the
Everyone interacting in the SKEET project’s codebases, issue trackers, chat
rooms, and mailing lists is expected to follow the
[code of conduct](https://github.com/elsoul/skeet/blob/master/CODE_OF_CONDUCT.md).

```
```
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elsoul/fresh-sitemap",
"version": "1.3.0",
"version": "1.3.1",
"description": "This plugin generates a sitemap for a Deno Fresh v2 project.",
"runtimes": ["deno", "browser"],
"exports": "./mod.ts",
Expand Down

0 comments on commit 17b31d7

Please sign in to comment.