0.9.4 • Published 4 years ago

@henriette-einstein/gridsome-transformer-asciidoc v0.9.4

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

@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

0.9.4

4 years ago

0.9.3

4 years ago

0.9.2

4 years ago

0.9.1

4 years ago

0.9.0

4 years ago

1.0.0

4 years ago