Skip to content

Commit

Permalink
fix: remove console.log typo, fix few README typo's
Browse files Browse the repository at this point in the history
  • Loading branch information
webketje committed Jan 30, 2022
1 parent dd8ec97 commit 2ea03de
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ extends:
- 'eslint:recommended'
- 'prettier'
parserOptions:
ecmaVersion: 2017
ecmaVersion: 2017
rules:
no-console: error
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ The `pattern` can contain a reference to any piece of metadata associated with t

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.

The `pattern` can also be a set as such:
The `pattern` can also be set as such:

```js
const Metalsmith = require('metalsmith');
const permalinks = require('@metalsmith/permalinks');

const metalsmith = new Metalsmith(__dirname).use(
permalinks({
Metalsmith(__dirname)
.use(permalinks({
// original options would act as the keys of a `default` linkset,
pattern: ':title',
date: 'YYYY',
Expand All @@ -60,8 +60,7 @@ const metalsmith = new Metalsmith(__dirname).use(
pattern: 'pages/:title'
}
]
})
);
}));
```

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

### Relative Files

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`.
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`.

For example for this source directory:

Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const family = (file, files) => {

return ret;
};
console.log('test')

/**
* Get a list of files that exists in a folder named after `file` for a given `file` in `files`.
*
Expand Down

0 comments on commit 2ea03de

Please sign in to comment.