# gobha-extension

> changes the file extension of the file

Latest version **1.0.5** (published 2018-10-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install gobha-extension
pnpm add gobha-extension
yarn add gobha-extension
bun add gobha-extension
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2018-10-15 |
| First published | 2017-06-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Daviot |
| Maintainers | daviot |
| Keywords | gobha, metalsmith |

## Links

- npm: https://www.npmjs.com/package/gobha-extension
- Repository: https://github.com/Daviot/gobha-extension
- Homepage: https://github.com/Daviot/gobha-extension#readme
- Issues: https://github.com/Daviot/gobha-extension/issues
- npm.io page: https://npm.io/package/gobha-extension

## Dependencies (4)

- [async](https://npm.io/package/async.md) ^2.6.1
- [extend](https://npm.io/package/extend.md) ^3.0.2
- [fs-jetpack](https://npm.io/package/fs-jetpack.md) ^1.3.1
- [handlebars](https://npm.io/package/handlebars.md) ^4.0.12

## Recent versions

- 1.0.5 (latest) — 2018-10-15
- 1.0.4 — 2017-08-24
- 1.0.3 — 2017-06-08
- 1.0.2 — 2017-06-07
- 1.0.1 — 2017-06-07
- 1.0.0 — 2017-06-07

## README

# gobha-extension

A [Metalsmith](www.metalsmith.io) plugin to change the file extension of the file

Can be used to create static sites, but with some more possibilities in dynamic web hosts. 

Every file that match the `extension` option will be converted into an *.html file.  
**Example**: `/test/demo.md` will become `/test/demo.html` 


## Installation

	$ npm install gobha-extension

## Javascript Usage

```js
let extension = require('gobha-extension')

metalsmith.use(extension())
```

## Options

```js
{
	extension: "html|php|md|hbs"
}
```
#### extension

The plugin checks every file extension and when the extension matches the regex it will process the file and change the file extension

## Change file extension

It's possible to use other file extensions then html.  
Just add a new meta information into the file itself to set the extension

```md
---
ext: php
---
```

The new meta ext will tell this site that the new file extension should be .php

**Example:** `file.md` with the meta `ext: php` will become `file.php`

Now it's possible to add PHP code into the site to process form data.

## License
MIT

---
_Source: https://npm.io/package/gobha-extension · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
