An AsciiDoc converter for Gridsom
Parses Asciidoc files using the Asciidoctor.js converter.
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
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
}
}
}
-
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 underattributes
-
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: