Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend and templates #11

Open
DevonVille opened this issue May 1, 2017 · 11 comments · Fixed by #17
Open

Backend and templates #11

DevonVille opened this issue May 1, 2017 · 11 comments · Fixed by #17

Comments

@DevonVille
Copy link

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?

@henriette-einstein henriette-einstein linked a pull request May 13, 2020 that will close this issue
@henriette-einstein
Copy link
Contributor

All mechanisms for customization of Asciidoctor are now supported. Please check if it works for you now.

@sanderson-sfdc
Copy link
Contributor

sanderson-sfdc commented Sep 1, 2020

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

@henriette-einstein
Copy link
Contributor

henriette-einstein commented Sep 1, 2020 via email

@ggrossetie
Copy link
Member

@henriette-einstein Hey! I've updated the NPM_TOKEN secret. Let me know if it's working.

@henriette-einstein
Copy link
Contributor

henriette-einstein commented Sep 1, 2020 via email

@sanderson-sfdc
Copy link
Contributor

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?

@sanderson-sfdc
Copy link
Contributor

sanderson-sfdc commented Sep 1, 2020

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.

@henriette-einstein
Copy link
Contributor

henriette-einstein commented Sep 2, 2020 via email

@henriette-einstein
Copy link
Contributor

henriette-einstein commented Sep 2, 2020 via email

@henriette-einstein
Copy link
Contributor

henriette-einstein commented Sep 2, 2020 via email

@sanderson-sfdc
Copy link
Contributor

No apologies! I can confirm that all works, thanks for the the rapid fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants