# kerouac-sitemap

> Sitemap middleware for Kerouac.

Latest version **0.5.0** (published 2023-12-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install kerouac-sitemap
pnpm add kerouac-sitemap
yarn add kerouac-sitemap
bun add kerouac-sitemap
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2023-12-14 |
| First published | 2013-05-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.6.0 |
| Dependencies | 1 |
| Unpacked size | 11.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Jared Hanson |
| Maintainers | jaredhanson |
| Keywords | sitemap, sitemaps |

## Links

- npm: https://www.npmjs.com/package/kerouac-sitemap
- Repository: https://github.com/jaredhanson/kerouac-sitemap
- Homepage: https://github.com/jaredhanson/kerouac-sitemap#readme
- Issues: https://github.com/jaredhanson/kerouac-sitemap/issues
- Funding: https://github.com/sponsors/jaredhanson
- npm.io page: https://npm.io/package/kerouac-sitemap

## Dependencies (1)

- [xmlbuilder](https://npm.io/package/xmlbuilder.md) 0.4.x

## Recent versions

- 0.5.0 (latest) — 2023-12-14
- 0.4.2 — 2018-09-12
- 0.4.1 — 2018-09-12
- 0.4.0 — 2017-10-08
- 0.3.1 — 2017-10-07
- 0.3.0 — 2017-10-06
- 0.2.0 — 2017-10-05
- 0.1.1 — 2013-05-23
- 0.1.0 — 2013-05-04

## README

# kerouac-sitemap

[Kerouac](https://github.com/jaredhanson/kerouac) middleware that generates
[sitemaps](https://www.sitemaps.org/), informing search engines about pages that
are available for crawling.

## Install

```sh
$ npm install kerouac-sitemap
```

## Usage

Declare a `sitemap.xml` route, using this middleware.

```js
var sitemap = require('kerouac-sitemap');

site.page('/sitemap.xml', sitemap());
```

And map a `sitemap.xml` file when generating the site.

```js
site.generate([
  sitemap.createMapper()
]);
```

#### Indexes

For a site that consists of multiple sections, each section can have its own
sitemap with each sitemap listed in a sitemap index.

```js
var sitemap = require('kerouac-sitemap');

var site = kerouac();

var docs = kerouac();
docs.page('/sitemap.xml', sitemap());

site.use('/docs', docs);
site.page('/sitemap.xml', sitemap());
site.page('/sitemap_index.xml', sitemap.index());

site.generate({
  '/docs': [
    sitemap.createMapper(),
  ],
  '/': [
    sitemap.createMapper({ index: true }),
  ],
});
```

## License

[The MIT License](https://opensource.org/licenses/MIT)

Copyright (c) 2012-2022 Jared Hanson <[https://www.jaredhanson.me/](https://www.jaredhanson.me/)>

---
_Source: https://npm.io/package/kerouac-sitemap · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
