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
- Host: GitHub
- URL: https://github.com/chris2011/nuxt-asciidoc
- Owner: Chris2011
- License: mit
- Created: 2023-06-27T12:06:14.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-11T21:49:06.000Z (almost 2 years ago)
- Last Synced: 2025-03-16T13:37:19.563Z (over 1 year ago)
- Language: TypeScript
- Size: 681 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# nuxt-asciidoc

[![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

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