https://github.com/moox/metalsmith-url
Metalsmith plugin to add url to entries from transformation on filenames
https://github.com/moox/metalsmith-url
Last synced: about 1 year ago
JSON representation
Metalsmith plugin to add url to entries from transformation on filenames
- Host: GitHub
- URL: https://github.com/moox/metalsmith-url
- Owner: MoOx
- License: mit
- Created: 2015-05-01T07:59:25.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-01-04T15:07:58.000Z (over 8 years ago)
- Last Synced: 2025-04-13T13:12:43.493Z (about 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# metalsmith-url [](https://travis-ci.org/MoOx/metalsmith-url)
> Metalsmith plugin to add url to entries from transformation on filenames
## Installation
```console
$ npm install metalsmith-url
```
## Usage
```js
import Metalsmith from "metalsmith"
import url from "metalsmith-url"
new Metalsmith("./")
.use(
url([
[/\.md$/, ".html"],
[/index\.html?$/, ""],
])
)
.build(err => {if (err) {throw err}})
```
### Options
This plugin takes an array.
Each item must be an array of [pattern, replacement]
## [Changelog](CHANGELOG.md)
## [License](LICENSE)