# nuxt-content-writer

> Enable content creators to write inside your Nuxt app

Latest version **1.0.0-beta.8** (published 2021-10-24) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install nuxt-content-writer
pnpm add nuxt-content-writer
yarn add nuxt-content-writer
bun add nuxt-content-writer
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0-beta.8 |
| Published | 2021-10-24 |
| First published | 2021-10-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 35.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Herman Lederer |
| Maintainers | hermanlederer |
| Keywords | nuxt, module, nuxt-module |

## Links

- npm: https://www.npmjs.com/package/nuxt-content-writer
- Repository: https://github.com/HermanLederer/nuxt-content-writer
- Homepage: https://github.com/HermanLederer/nuxt-content-writer#readme
- Issues: https://github.com/HermanLederer/nuxt-content-writer/issues
- npm.io page: https://npm.io/package/nuxt-content-writer

## Dependencies (8)

- [cors](https://npm.io/package/cors.md) ^2.8.5
- [defu](https://npm.io/package/defu.md) latest
- [sass](https://npm.io/package/sass.md) ^1.42.1
- [upath](https://npm.io/package/upath.md) latest
- [express](https://npm.io/package/express.md) ^4.17.1
- [object-path](https://npm.io/package/object-path.md) ^0.11.8
- [@nuxt/content](https://npm.io/package/@nuxt/content.md) ^1.14.0
- [@nuxtjs/axios](https://npm.io/package/@nuxtjs/axios.md) ^5.13.6

## Recent versions

- 1.0.0-beta.8 (latest) — 2021-10-24
- 1.0.0-beta.7 — 2021-10-23
- 1.0.0-beta.6 — 2021-10-17
- 1.0.0-beta.5 — 2021-10-16
- 1.0.0-beta.3 — 2021-10-11
- 1.0.0-beta.2 — 2021-10-11
- 1.0.0-beta.1 — 2021-10-11
- 1.0.0-beta.0 — 2021-10-11

## README

# nuxt-content-writer

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Codecov][codecov-src]][codecov-href]
[![License][license-src]][license-href]

> nuxt-content-writer expands @nuxt/content module functionality by
> allowing you to edit your /content directory visually right from inside your Nuxt app

- [📖 **Release Notes**](https://github.com/HermanLederer/nuxt-content-writer/releases)

## Features

- A file picker component
- Delete or create new files
- Rename files (coming soon)
- Customizable editors
- Quick wrapper for NuxtContent to load and select content easily
- Create, edit and delete pages visually
- Minimum production build size impact
- A backend API at /_editor that accepts GET, POST and DELETE requests and can traverse json files using [object-path](https://github.com/mariocasciaro/object-path)

## Setup

1. Add `nuxt-content-writer` and its dependencies to your project

```bash
yarn add @nuxt/content # or npm install @nuxt/content
yarn add @nuxtjs/axios # or npm install @nuxtjs/axios 
yarn add nuxt-content-writer # or npm install nuxt-content-writer
```

2. Add `nuxt-content-writer` and its dependencies to the `modules` section of `nuxt.config.js`

```js
{
  modules: [
    '@nuxt/content',
    '@nuxtjs/axios',
    'nuxt-content-writer',
  ],
  nuxtEditor: {
    // module options
  }
}
```

## How to use

There is no guide yet but you can see how to use the available components, create a visual editor for dyanmic pages and customize editors in [the eample](https://github.com/HermanLederer/nuxt-content-writer).

If you would like to explore the source code it is usseful to know that files that end with .dev are not included in the production build at all, and files with .prod are not included in dev at all. Similarly to that, css classes that start with an _ are never found in the production build. [The eample](https://github.com/HermanLederer/nuxt-content-writer) still adds costumization to those classes in production mode but that is done to make the example simpler. Ideally you want to have a local plugin in your Nuxt app that only inludes these customizations in dev mode.

To checkout the example

1. Clone this repository

```bash
git clone https://github.com/HermanLederer/nuxt-content-writer.git
cd nuxt-content-writer
```

2. Install dependencies

```bash
yarn
```

3. Start development server

```bash
yarn dev
```

## License

[MIT License](./LICENSE)

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/nuxt-content-writer/latest.svg
[npm-version-href]: https://npmjs.com/package/nuxt-content-writer
[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-content-writer.svg
[npm-downloads-href]: https://npmjs.com/package/nuxt-content-writer
[github-actions-ci-src]: https://github.com/HermanLederer/nuxt-content-writer/workflows/ci/badge.svg
[github-actions-ci-href]: https://github.com/HermanLederer/nuxt-content-writer/actions?query=workflow%3Aci
[codecov-src]: https://img.shields.io/codecov/c/github/HermanLederer/nuxt-content-writer.svg
[codecov-href]: https://codecov.io/gh/HermanLederer/nuxt-content-writer
[license-src]: https://img.shields.io/npm/l/nuxt-content-writer.svg
[license-href]: https://npmjs.com/package/nuxt-content-writer

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