# kg-eleventy-plugin-wordpress

> Experimental WordPress-to-11ty Plugin. Currently loads Pages, Posts, and Tags

Latest version **0.1.3** (published 2024-01-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install kg-eleventy-plugin-wordpress
pnpm add kg-eleventy-plugin-wordpress
yarn add kg-eleventy-plugin-wordpress
bun add kg-eleventy-plugin-wordpress
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2024-01-18 |
| First published | 2024-01-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | KevinGimbel |
| Maintainers | kevingimbel |
| Keywords | 11ty, 11ty-plugin, eleventy, eleventy-plugin |

## Links

- npm: https://www.npmjs.com/package/kg-eleventy-plugin-wordpress
- Repository: https://github.com/KevinGimbel/eleventy-plugin-wordpress
- Homepage: https://github.com/KevinGimbel/eleventy-plugin-wordpress#readme
- Issues: https://github.com/KevinGimbel/eleventy-plugin-wordpress/issues
- npm.io page: https://npm.io/package/kg-eleventy-plugin-wordpress

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 0.1.3 (latest) — 2024-01-18
- 0.1.2 — 2024-01-07
- 0.1.1 — 2024-01-07
- 0.1.0 — 2024-01-05

## README

# eleventy-plugin-wordpress

<!-- BEGIN mktoc -->

- [What is this plugin?](#what-is-this-plugin)
- [Support](#support)
  - [Goals](#goals)
  - [Non-goals](#non-goals)
- [Usage](#usage)
  - [Installation](#installation)
  - [Configuration](#configuration)
  - [Template usage](#template-usage)
<!-- END mktoc -->

## What is this plugin?

This plugin loads various things out of WordPress and makes it available as data-source in 11ty.

## Support

This plugin is **very unsupported** and intended for my own usage. I'm open-sourcing it as I like to share all the code I write, and if you find it useful feel free to use the plugin with your own website(s).

**Expect breaking changes as I build the plugin to fits my needs**

The plugin is also quite slow, it takes between 4-5 seconds to load data from a relativly small wordpress page (~300 Tags, 16 Pages, 138 posts)

### Goals

- Load content (Pages, Posts, Tags, Categories) out of wordpress and use it to render a static website with 11ty

### Non-goals

- Load Media files

## Usage

### Installation
Install the plugin via npm, then configure it.

```sh
npm install --save kg-eleventy-plugin-wordpress
```

### Configuration

```js
const  EleventyWP = require('kg-eleventy-plugin-wordpress');

module.exports = (eleventyConfig, options) => {
    
    eleventyConfig.addPlugin(EleventyWP, {
        base_url: "https://example.com"
    });
    // [rest of config]
};
```

### Template usage

The plugin provides the following data sets:

- `wp.pages` containing all pages
- `wp.posts` containing all posts
- `wp.tags` containing all tags

See files in the `dev` folder for an example.

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