Skip to content

Latest commit

 

History

History
165 lines (111 loc) · 3.52 KB

File metadata and controls

165 lines (111 loc) · 3.52 KB

back to README.md

Configuration

This plugin applies the following configuration

Templates

[back to README.md](../README.md)

## Configuration 

This plugin applies the following configuration

{{#thoughtPluginConfig}}

{{#if handlebars.templates}}
### Templates

{{#each handlebars.templates}}
#### [{{@key}}]({{path}})

{{#codeBlock}}hbs
{{{contents}}}
{{/codeBlock}}
    
{{/each}}        

{{/if}}

{{#if handlebars.partials}}
### Partials

{{#each handlebars.partials}}
#### [{{@key}}]({{path}})

{{#codeBlock}}hbs
{{{contents}}}
{{/codeBlock}}

{{/each}}

{{/if}}

### Helpers

{{jsdoc handlebars.helpers}}
    
{{/thoughtPluginConfig}}

Partials

## API (Partials and Helpers)

see [docs/api.md](docs/api.md)
{{!--
  This partial can be overridden to provide non-standard 
  information about example projets etc.
--}}
## Example

You can see the plugin in action in [the example-project](examples/example-project)

## Installation

In order to use this plugin for {{npm 'thought'}},
first add it to the dev-dependencies of your project

```bash
npm install --save-dev {{package.name}}
```
## Usage

You can then add a file `.thought/config.js` to your 
project, with the following contents.

```js
module.exports = {
  plugins: [
    require('{{package.name}}')
  ]
}
```

{{>example.md}}

Helpers

Functions

codeBlock()Promise.<string>

Create a markdown code-block with enough backticks

The surrounding fences of a code-block must have more backticks than the maximum number of consecutive backticks in the contents (escaping backticks github/markup#363). This block-helper creates enough and at least three.

thoughtPluginConfig(options)Promise

Continue with the thought-configuration of the current plugin

The helper loads the thought-configuration from the plugin in the current working directory and passed the resulting JSON as context to the content-block.

codeBlock() ⇒ Promise.<string>

Create a markdown code-block with enough backticks

The surrounding fences of a code-block must have more backticks than the maximum number of consecutive backticks in the contents (escaping backticks github/markup#363). This block-helper creates enough and at least three.

Kind: global function
Returns: Promise.<string> - the string containing the
Example

{{#codeBlock}}hbs
Some markdown hbs template
{{/codeBlock}}

thoughtPluginConfig(options) ⇒ Promise

Continue with the thought-configuration of the current plugin

The helper loads the thought-configuration from the plugin in the current working directory and passed the resulting JSON as context to the content-block.

Kind: global function
Access: public

Param
options