Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kwaa/hexo-partytown

🎉 Partytown Integration for Hexo
https://github.com/kwaa/hexo-partytown

hexo hexo-filter hexo-plugin hexojs partytown performance typescript web-worker webworker

Last synced: 16 days ago
JSON representation

🎉 Partytown Integration for Hexo

Awesome Lists containing this project

README

        

# hexo-partytown

🎉 [Partytown](https://github.com/BuilderIO/partytown) Integration for [Hexo](https://github.com/hexojs/hexo)

## Install

```bash
pnpm add hexo-partytown # pnpm
yarn add hexo-partytown # yarn
npm i hexo-partytown # npm
```

## Config

```ts
type HexoPartytownConfig = {
/**
* Script matching fields
* @remarks If using an array, run as `new RegExp(arr[0], arr[1])`
* @defaultValue `[['^https://.+.min.js$', 'i']]`
*/
match: (string | [string, string])[]
/**
* Script matching range
* @defaultValue `html`
*/
range: string
/**
* Partytown Snippet
* @defaultValue `inline`
*/
snippet: string | false
/**
* Copy Library Files
* @defaultValue `true`
*/
copylib: boolean
/**
* Partytown Configuration
* @see {@link https://partytown.builder.io/configuration}
*/
config?: PartytownConfig
}
```

Write into `_config.yml` to override default value.

```yaml
partytown:
config:
debug: true
forward:
- dataLayer.push
```

## License

Licensed under the [WTFPL](http://www.wtfpl.net), See the [COPYING](COPYING) file for more details.