Skip to content

Commit 2ea03de

Browse files
committedJan 30, 2022
fix: remove console.log typo, fix few README typo's
1 parent dd8ec97 commit 2ea03de

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed
 

‎.eslintrc.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ extends:
55
- 'eslint:recommended'
66
- 'prettier'
77
parserOptions:
8-
ecmaVersion: 2017
8+
ecmaVersion: 2017
9+
rules:
10+
no-console: error

‎README.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ The `pattern` can contain a reference to any piece of metadata associated with t
3636

3737
If no pattern is provided, the files won't be remapped, but the `path` metadata key will still be set, so that you can use it for outputting links to files in the template.
3838

39-
The `pattern` can also be a set as such:
39+
The `pattern` can also be set as such:
4040

4141
```js
4242
const Metalsmith = require('metalsmith');
4343
const permalinks = require('@metalsmith/permalinks');
4444

45-
const metalsmith = new Metalsmith(__dirname).use(
46-
permalinks({
45+
Metalsmith(__dirname)
46+
.use(permalinks({
4747
// original options would act as the keys of a `default` linkset,
4848
pattern: ':title',
4949
date: 'YYYY',
@@ -60,8 +60,7 @@ const metalsmith = new Metalsmith(__dirname).use(
6060
pattern: 'pages/:title'
6161
}
6262
]
63-
})
64-
);
63+
}));
6564
```
6665

6766
### Dates
@@ -145,7 +144,7 @@ There are plenty of other options on npm for transliteration and slugs. <https:/
145144

146145
### Relative Files
147146

148-
When this plugin rewrites your files to be permalinked properly, it will also duplicate sibling files so that relative links like `/images/cat.gif` will be preserved nicely. You can turn this feature off by setting the `relative` option to `false`.
147+
When this plugin rewrites your files to be permalinked properly, it will also duplicate sibling files so that relative links like `css/style.css` will be preserved nicely. You can turn this feature off by setting the `relative` option to `false`.
149148

150149
For example for this source directory:
151150

‎lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const family = (file, files) => {
100100

101101
return ret;
102102
};
103-
console.log('test')
103+
104104
/**
105105
* Get a list of files that exists in a folder named after `file` for a given `file` in `files`.
106106
*

0 commit comments

Comments
 (0)
Please sign in to comment.