# eleventy-plugin-bookwyrm

> Fetch a BookWyrm feed and add it as an Eleventy collection

Latest version **1.4.0** (published 2023-10-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install eleventy-plugin-bookwyrm
pnpm add eleventy-plugin-bookwyrm
yarn add eleventy-plugin-bookwyrm
bun add eleventy-plugin-bookwyrm
```

## 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.4.0 |
| Published | 2023-10-27 |
| First published | 2022-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Lewis Dale |
| Maintainers | ldaleuk |
| Keywords | eleventy, bookwyrm, rss, activitypub |

## Links

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

## Dependencies (2)

- [rss-parser](https://npm.io/package/rss-parser.md) ^3.12.0
- [@11ty/eleventy-fetch](https://npm.io/package/@11ty/eleventy-fetch.md) ^3.0.0

## 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

- 1.4.0 (latest) — 2023-10-27
- 1.3.0 — 2023-10-25
- 1.2.0 — 2022-12-17
- 1.1.0 — 2022-12-17
- 1.0.0 — 2022-12-16

## README

# eleventy-plugin-bookwyrm

A simple plugin that, given a BookWyrm username & instance URL, will add global data to your Eleventy configuration with a parsed form of the user's outbox.

## Usage

```javascript
const bookwyrmFeed = require('eleventy-plugin-bookwyrm');

module.exports = function (eleventyConfig) {
	// Pass the username and domain separately
	// e.g. if you are p.blart@bookwyrm.social, user is p.blart,
	// and the domain is bookwyrm.social
	eleventyConfig.addPlugin(bookwyrmFeed, {
		user: 'username',
		domain: 'instancedomain.com',
		dataKey: "readinglist" // Optional, defaults to "bookwyrm"
	});
}
```

This adds a new Global Data entry called `readinglist`, which contains an array with the following properties:

```javascript
{
	date: Date,
	status: string,
	type: "Review" | "Update",
	book: {
		title: string,
		authors: string[],
		description: string,
		publishedDate: Date,
		cover: string,
	}
}
```

e.g.

```json
[
	{
	"book": {
		"title": "NOS4A2",
		"authors": [
		"Joe Hill"
		],
		"description": "",
		"publishedDate": "2013-10-15T00:00:00.000Z",
		"cover": "https://bookrastinating.com/images/covers/eae4779a-bafd-4514-aa2c-28356ca60b7d.jpeg"
	},
	"events": [
			{
				"date": "2022-12-06T09:28:16.043Z",
				"status": "Lewis finished reading \"NOS4A2\"",
				"type": "Update"
			},
			{
				"date": "2022-12-06T09:52:12.000Z",
				"status": "rated \"NOS4A2\" 4 stars",
				"type": "Review"
			}
		]
	}
]
```

Paste the following code in your template to display available data as stringified JSON objects:

```
{% for data in readinglist %}
{{ data | dump }}<br/><br/><br/>
{% endfor %}
```

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