Skip to content

Commit

Permalink
chore(example): replace Lorem with Pipeline (#773)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxingloh authored Feb 2, 2024
1 parent 0404a17 commit 7975c19
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 123 deletions.
2 changes: 0 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#### What this PR does / why we need it:

#### Which issue(s) will this PR fix?:

#### Additional notes:
4 changes: 2 additions & 2 deletions example/contented.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ const config = {
},
},
{
type: 'Lorem',
dir: 'example/lorem',
type: 'Pipeline',
dir: 'example/pipeline',
pattern: ['**/*.md'],
processor: 'md',
},
Expand Down
64 changes: 0 additions & 64 deletions example/lorem/0-lorem-1.md

This file was deleted.

55 changes: 0 additions & 55 deletions example/lorem/1-lorem-2.md

This file was deleted.

37 changes: 37 additions & 0 deletions example/pipeline/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Pipeline

You can create another pipeline by adding a new unique `type` field.
The same `type` are grouped together and processed in the order they are defined.

:::codeblock-header{filename="contented.config.mjs" language="JavaScript"}

```js
/** @type {import('@contentedjs/contented').ContentedConfig} */
const config = {
processor: {
pipelines: [
{
type: 'Contented',
pattern: 'README.md',
processor: 'md',
},
{
type: 'Contented',
dir: 'example/docs',
pattern: '**/*.md',
processor: 'md',
},
{
type: 'Pipeline',
dir: 'example/pipeline',
pattern: ['**/*.md'],
processor: 'md',
},
],
},
};

export default config;
```

:::

0 comments on commit 7975c19

Please sign in to comment.