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

https://github.com/chris2011/nuxt-asciidoc

Transformer for using asciidoc in nuxt
https://github.com/chris2011/nuxt-asciidoc

Last synced: over 1 year ago
JSON representation

Transformer for using asciidoc in nuxt

Awesome Lists containing this project

README

          

# nuxt-asciidoc

![nuxt-asciidoc-logo](./nuxt-asciidoc.svg)

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]

If you like asciidoc more than markdown, this plugin is exactly for you.

- [✨  Release Notes](/CHANGELOG.md)

## Features

- ⛰  It can handle .adoc and there corresponding file extensions and render them.

## Known Problems

- `include` will not include the content of another file, it will just make a link out of it. You can see it in the screenshot.

## Screenshot

![nuxt-asciidoc](./screenshots/nuxt-asciidoc.png)

## Quick Setup

1. Add `nuxt-asciidoc` dependency to your project

```bash
npx nuxi@latest module add nuxt-asciidoc
```

2. Add `nuxt-asciidoc` to the `modules` section, before the `@nuxt/content` of `nuxt.config.ts`

```js
export default defineNuxtConfig({
modules: [
'nuxt-asciidoc',
...
'@nuxt/content'
]
})
```

That's it! You can now use My Module in your Nuxt app ✨

## Example

view: pages/imprint.vue + corresponding content file: content/imprint.adoc
```vue

const { data } = await useAsyncData("imprint", () =>
queryContent("/imprint").findOne()
);





```

## Development (npm, yarn, pnpm)

```bash
# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release
```

[npm-version-src]: https://img.shields.io/npm/v/nuxt-asciidoc/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-version-href]: https://npmjs.com/package/nuxt-asciidoc

[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-asciidoc.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-downloads-href]: https://npmjs.com/package/nuxt-asciidoc

[license-src]: https://img.shields.io/npm/l/nuxt-asciidoc.svg?style=flat&colorA=18181B&colorB=28CF8D
[license-href]: https://npmjs.com/package/nuxt-asciidoc

[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
[nuxt-href]: https://nuxt.com