<commit_before># Scroll Rack

A small collection of [Metalsmith](http://www.metalsmith.io/) plugins and custom modules intended to generate guidlines and documentation for your company, in form of a static web page. It is ready for use and requires almost not configuration or other setup. Just `require` it and specify a source and destination directory.

**Features:**

- Parse Markdown files with [markdown-it](https://markdown-it.github.io)
- Enabled footnotes via [markdown-it-footnote](https://github.com/markdown-it/markdown-it-footnote)
- Code highlighting with [highlight.js](https://highlightjs.org/)
- Genernate table of contents & navigation
- Provide local server + livereload (for development and writing)

## Installation

```bash
$ npm install --save scroll-rack
```

## How Stuff gets parsed

*Scroll Rack* will read all contents inside a directory, specified via the `files` option. The structore of the contents will be persisted. A navigation is automatically generated based on the folder structure. Sub-directories will be treated as content sections and every Markdown file will be parsed to HTML and made availble as a child page of its section. All generated content is put inside a `dest`.

**Example:**

If you specified `docs` as your root and have the following folder structure:

```
docs/
 ├── javascript/
 │     ├── types.md
 │     ├── references.md
 │     ├── arrays.md
 │     └── objects.md
 │
 └── coding_styleguide/
       ├── modules.md
       ├── services.md
       └── testing.md
```

The generated navigation/table of contents will look like this (where the displayed name of page is its `title` attribute):

```
1. JavaScrip
  1.1 Types
  1.2 References
  1.3 Arrays
  1.4 Objects

2. Coding Styleguide
  2.1 Modules
  2.2 Services
  2.3 Testing
```

Metalsmith allows the usage of YAML front-matters. A `title` is required and will not be read from the Markdown correctly.

## Usage

### Simple

```javascript
var scrollRack = require('scroll-rack');

scrollRack({
    files: 'docs',
    dest: '__build'
});
```

### With Options

```javascript
var scrollRack = require('scroll-rack');

// Full options list with defaults
scrollRack({

    // Required
    files: undefined,                       // Documentation files root dir
    dest: undefined,                        // Destination for generated files,

    // Optional
    ignore: ['*.js', '*.ts', '.DS_Store'],  // Files that should not be copied to dest
<commit_msg>Fix a typo in readme.<commit_after># Scroll Rack

A small collection of [Metalsmith](http://www.metalsmith.io/) plugins and custom modules intended to generate guidlines and documentation for your company, in form of a static web page. It is ready for use and requires almost not configuration or other setup. Just `require` it and specify a source and destination directory.

**Features:**

- Parse Markdown files with [markdown-it](https://markdown-it.github.io)
- Enabled footnotes via [markdown-it-footnote](https://github.com/markdown-it/markdown-it-footnote)
- Code highlighting with [highlight.js](https://highlightjs.org/)
- Genernate table of contents & navigation
- Provide local server + livereload (for development and writing)

## Installation

```bash
$ npm install --save scroll-rack
```

## How Stuff gets parsed

*Scroll Rack* will read all contents inside a directory, specified via the `files` option. The structore of the contents will be persisted. A navigation is automatically generated based on the folder structure. Sub-directories will be treated as content sections and every Markdown file will be parsed to HTML and made availble as a child page of its section. All generated content is put inside a `dest`.

**Example:**

If you specified `docs` as your root and have the following folder structure:

```
docs/
 ├── javascript/
 │     ├── types.md
 │     ├── references.md
 │     ├── arrays.md
 │     └── objects.md
 │
 └── coding_styleguide/
       ├── modules.md
       ├── services.md
       └── testing.md
```

The generated navigation/table of contents will look like this (where the displayed name of page is its `title` attribute):

```
1. JavaScrip
  1.1 Types
  1.2 References
  1.3 Arrays
  1.4 Objects

2. Coding Styleguide
  2.1 Modules
  2.2 Services
  2.3 Testing
```

Metalsmith allows the usage of YAML front-matters. A `title` is required and will not be read from the Markdown.

## Usage

### Simple

```javascript
var scrollRack = require('scroll-rack');

scrollRack({
    files: 'docs',
    dest: '__build'
});
```

### With Options

```javascript
var scrollRack = require('scroll-rack');

// Full options list with defaults
scrollRack({

    // Required
    files: undefined,                       // Documentation files root dir
    dest: undefined,                        // Destination for generated files,

    // Optional
    ignore: ['*.js', '*.ts', '.DS_Store'],  // Files that should not be copied to dest

{'fraction_non_alphanumeric': 0.10486815415821502, 'fraction_numerical': 0.006490872210953347, 'mean_word_length': 3.3444933920704845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1904390', 'n_tokens_mistral': 1434, 'n_tokens_neox': 1363, 'n_words': 601}