@henriette-einstein/gridsome-transformer-asciidoc

0.9.4 • Public • Published

@henriette-einstein/gridsome-transformer-asciidoc

An AsciiDoc converter for Gridsom

Parses Asciidoc files using the Asciidoctor.js converter.

Install

You can either use npm or yarn. Pick the corresponding command

  • yarn add @henriette-einstein/gridsome-transformer-asciidoc
  • npm install @henriette-einstein/gridsome-transformer-asciidoc

Usage

The transformer is automatically used if installed in your project. Custom transformer options can either be set for each source plugin or globally.

//gridsome.config.js
module.exports = {
  plugins: [
    {
      use: '@gridsome/source-filesystem',
      options: {
        path: 'blog/**/*.adoc',
        typeName: 'Post',
        asciidoc: {
          // asciidoc options
        }
      }
    }
  ],
  transformers: {
    asciidoc: {
      // global asciidoc options
    }
  }
}

Transformer Options

  • attributeNamePrefix

    Defaults to ['data-', 'doc']. Defines the prefixes for the Asciidoc attributes that should be included in the GraphQL node. Each attribute that starts with one of the given prefixes will be added under attributes

  • attributes

    Defaults to attributes: { idprefix: 'id_' }. Defines the attributes passed to the underlying asciidoctor converter. A full list of the converters options can be found here:

    Asciidoctor's converter options

Package Sidebar

Install

npm i @henriette-einstein/gridsome-transformer-asciidoc

Weekly Downloads

0

Version

0.9.4

License

MIT

Unpacked Size

6.3 kB

Total Files

7

Last publish

Collaborators

  • henriette-einstein