Skip to content

Commit

Permalink
update api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
itsarnaud committed Apr 18, 2024
1 parent 52f3bc6 commit 600ca9b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/guide/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Render

Render a Dust.js template with the given context.
Render a Dust template string with data.

```js
const igodust = require('igo-dust');
Expand All @@ -13,8 +13,12 @@ igodust.render('Hello, {name}!', { name: 'World' });

## Render File

Render a Dust.js template file with the given context.
Render a Dust template file with data.

```js
const igodust = require('igo-dust');

igodust.renderFile('path/to/template.dust', { name: 'World' });
// => Hello, World!
```

0 comments on commit 600ca9b

Please sign in to comment.