Skip to content

Commit

Permalink
chore: release new version and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TorstenDittmann committed Aug 20, 2023
1 parent d107faf commit 8e39407
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions apps/demo/src/routes/advanced/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,30 @@ In the `markdoc.config.json` [configuration file](https://github.com/markdoc/lan
}
]
```

## Markdoc configuration

You can configure the underlying Markdoc compiler by passing a [configuration object](https://markdoc.dev/docs/config#options).

```js
// svelte.config.js
markdoc({
config: {
variables: {
name: 'Dr. Mark',
frontmatter: {
title: 'Configuration options'
}
},
functions: {
includes: {
transform(parameters, config) {
const [array, value] = Object.values(parameters);

return Array.isArray(array) ? array.includes(value) : false;
}
}
}
}
})
```
2 changes: 1 addition & 1 deletion packages/process/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svelte-markdoc-preprocess",
"version": "0.1.2",
"version": "0.1.3",
"description": "A Svelte preprocessor that allows you to use Markdoc.",
"type": "commonjs",
"keywords": [
Expand Down

0 comments on commit 8e39407

Please sign in to comment.