Open DevonVille opened 7 years ago
All mechanisms for customization of Asciidoctor are now supported. Please check if it works for you now.
I'm trying a simple one and it's not working for me.
const asciidoctor = require('gulp-asciidoctor')
function processAdocFiles (cb) {
gulp.src('./content/**/*.adoc')
.pipe(asciidoctor({
extension: '.htm'
}))
.pipe(gulp.dest('./output'))
cb()
}
function copyImages(cb) {
gulp.src('./content/**/*.png')
.pipe(gulp.dest('./output'))
cb()
}
exports.process = gulp.parallel(processAdocFiles, copyImages)
All my files still have the extension .html.
Also, backend doesn't seem to be working either.
.pipe(asciidoctor({
backend: 'xhtml'
}))
.pipe(gulp.dest('./output'))
cb()
}
results in the same content as html5
Hello Steve,
The package „gulp-asciidoctor“ in the npm registry is completely outdated. However I can neither update it, nor can I create the package @asciidoctor/gulp-asciidoctor in npmjs due to missing credentials.
As a workaround, I have published the package based on the current source code to
@henriette-einstein/gulp-asciidoctor
If you use this package with
const asciidoctor = require(@henriette-einstein/gulp-asciidoctor')
your script will work.
Sorry for the inconveniences
@Mogztter: Maybe someone can add valid credentials to publish to @asciidoctor/gulp-asciidoctor for the Github action. I tried my own credentials, but that does not work.
Am 01.09.2020 um 03:23 schrieb Steve Anderson notifications@github.com:
I'm trying a simple one and it's not working for me.
const asciidoctor = require('gulp-asciidoctor')
function processAdocFiles (cb) { gulp.src('./content/*/.adoc') .pipe(asciidoctor({ extension: '.htm' })) .pipe(gulp.dest('./output')) cb() }
function copyImages(cb) { gulp.src('./content/**/*.png') .pipe(gulp.dest('./output')) cb() } exports.process = gulp.parallel(processAdocFiles, copyImages)
All my files still have the extension .html.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/asciidoctor/gulp-asciidoctor/issues/11#issuecomment-684135396, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK5KYCGXAENEU7U2QYBWZ6LSDREJZANCNFSM4DJWBGQA.
@henriette-einstein Hey! I've updated the NPM_TOKEN
secret. Let me know if it's working.
Perfect!
Now it works and it is published to npmjs
Thanks a lot!
Am 01.09.2020 um 12:23 schrieb Guillaume Grossetie notifications@github.com:
@henriette-einstein https://github.com/henriette-einstein Hey! I've updated the NPM_TOKEN secret. Let me know if it's working.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/asciidoctor/gulp-asciidoctor/issues/11#issuecomment-684738740, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK5KYCED5HUHTC77ZPLAAW3SDTDTFANCNFSM4DJWBGQA.
I can confirm that updating my package.json with
"devDependencies": {
"@henriette-einstein/gulp-asciidoctor": "^2.2.2",
...
and updating the gulpfile resolves the extension issue.
With the upgrade to npmjs, should I get the same result by doing a
npm update && npm install
or is there more to do?
Just tested the backend option with docbook and still saw html5 output.
const gulp = require('gulp')
//const asciidoctor = require('gulp-asciidoctor')
const asciidoctor = require('@henriette-einstein/gulp-asciidoctor')
const aDocbook = require('@asciidoctor/docbook-converter')()
function processAdocFiles (cb) {
gulp.src('./content/**/*.adoc')
.pipe(asciidoctor({
backend: 'docbook'
}))
.pipe(gulp.dest('./output'))
cb()
}
function copyImages(cb) {
gulp.src('./content/**/*.png')
.pipe(gulp.dest('./output'))
cb()
}
exports.process = gulp.parallel(processAdocFiles, copyImages)
Is there a step to add a backend and register it?
Edit: Added the docbook-converter package, and that didn't seem to resolve it.
Hello Steve,
you have to change the dependency and use
@asciidoctor/gulp-asciidoctor
The @henriette-einstein package will not be maintained further
The gulp file will also have to require the @asciidoctor/gulp-asciidoctor package
Am 01.09.2020 um 18:12 schrieb Steve Anderson notifications@github.com:
I can confirm that updating my package.json with
"devDependencies": { "@henriette-einstein/gulp-asciidoctor": "^2.2.2", ... and updating the gulpfile resolves the extension issue.
With the upgrade to npmjs, should I get the same result by doing a
npm update && npm install
or is there more to do?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/asciidoctor/gulp-asciidoctor/issues/11#issuecomment-684968957, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK5KYCBGQ5OSRQ77DJP227TSDUMO3ANCNFSM4DJWBGQA.
Hi Steve,
that looks like an error. I’l check that.
Am 01.09.2020 um 18:17 schrieb Steve Anderson notifications@github.com:
Just tested the backend option with docbook5 and still saw html5 output.
const gulp = require('gulp') //const asciidoctor = require('gulp-asciidoctor') const asciidoctor = require('@henriette-einstein/gulp-asciidoctor')
function processAdocFiles (cb) { gulp.src('./content/*/.adoc') .pipe(asciidoctor({ backend: 'docbook5'
})) .pipe(gulp.dest('./output')) cb() }function copyImages(cb) { gulp.src('./content/**/*.png') .pipe(gulp.dest('./output')) cb() } exports.process = gulp.parallel(processAdocFiles, copyImages)
Is there a step to add a backend and register it?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/asciidoctor/gulp-asciidoctor/issues/11#issuecomment-684973781, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK5KYCH4UBJGOEXF7BHENNDSDUNBTANCNFSM4DJWBGQA.
Hello Steve,
the error has been fixed with the latest release 2.2.5
use
npm i @asciidoctor/gulp-asciidoctor and update the require to use the @asciidoctor/gulp-asciidoctor package
Sorry for your inconveniences
Am 01.09.2020 um 18:17 schrieb Steve Anderson notifications@github.com:
Just tested the backend option with docbook5 and still saw html5 output.
const gulp = require('gulp') //const asciidoctor = require('gulp-asciidoctor') const asciidoctor = require('@henriette-einstein/gulp-asciidoctor')
function processAdocFiles (cb) { gulp.src('./content/*/.adoc') .pipe(asciidoctor({ backend: 'docbook5'
})) .pipe(gulp.dest('./output')) cb() }function copyImages(cb) { gulp.src('./content/**/*.png') .pipe(gulp.dest('./output')) cb() } exports.process = gulp.parallel(processAdocFiles, copyImages)
Is there a step to add a backend and register it?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/asciidoctor/gulp-asciidoctor/issues/11#issuecomment-684973781, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK5KYCH4UBJGOEXF7BHENNDSDUNBTANCNFSM4DJWBGQA.
No apologies! I can confirm that all works, thanks for the the rapid fix!
I want to use gulp-asciidoctor to render my adoc files to reveal.js slides asciidoctor-reveal.js has usable custom templates I've been wondering how to use it
any idea?