# krypa

> Front matter sitemap generator.

Latest version **2.0.1** (published 2016-07-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install krypa
pnpm add krypa
yarn add krypa
bun add krypa
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2016-07-09 |
| First published | 2016-05-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mitchell Gates |
| Maintainers | msfragala |
| Keywords | front matter, templating, recursive, crawler, sitemap, data |

## Links

- npm: https://www.npmjs.com/package/krypa
- Repository: https://github.com/msfragala/krypa
- Homepage: https://github.com/msfragala/krypa#readme
- Issues: https://github.com/msfragala/krypa/issues
- npm.io page: https://npm.io/package/krypa

## Dependencies (4)

- [globby](https://npm.io/package/globby.md) ^4.1.0
- [is-glob](https://npm.io/package/is-glob.md) ^2.0.1
- [traverse](https://npm.io/package/traverse.md) ^0.6.6
- [gray-matter](https://npm.io/package/gray-matter.md) ^2.0.2

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2016-07-09
- 2.0.0 — 2016-07-09
- 1.0.2 — 2016-05-27
- 1.0.1 — 2016-05-27
- 1.0.0 — 2016-05-27

## README

# krypa
Recursively walk through a directory and construct a front matter sitemap.

## Install
```shell
npm install krypa
```

## Getting Started
```javascript
var krypa = require('krypa');
var hm = require('hjson-matter');

// generate a sitemap of YAML front-matter
var sitemap = krypa('./directory');

// specify your own front-matter parser
var sitemap = krypa('./directory', hm);

// pass ignore options to globby
var sitemap = krypa('./directory', { ignore: '!**/*.md' });

// pass ignore options AND a custom parser
var sitemap = krypa('./directory', {
  ignore: '!**/*.md',
  parser: hm
});
```

## Parameters

#### krypa(directory, options)

`directory` **{String}** - Path of the directory you want to generate a front matter sitemap for.

`options` **{Function|Object}** - The ignore and parser options, or just `options.parser` directly.

`options.ignore` **{String|String[]}** - Glob of files to ignore to pass to [globby](https://www.npmjs.com/package/globby) (see [node-glob](https://github.com/isaacs/node-glob#options)).

_Default: `!**/*.{html,markdown,md,nunjucks,swig,twig}`_

`options.parser` **{Function}** - Custom parser to extract front-matter from files. This should return the front-matter data itself, so if your parser returns the data as an object property (such as `attributes` in [front-matter](https://github.com/jxson/front-matter)), you should create a light wrapper around it.

_Default: a light wrapper around [gray-matter](https://github.com/jonschlinkert/gray-matter)_

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