Coder Social home page Coder Social logo

antora-partials's Introduction

PDF generation: Jail is not an absolute path

This is for investigating Antora Assembler to produce PDFs in an Antora-native way, rather than our current hacks.

It aims to reproduce problems encountered when generating PDFs that aren’t seen when generating HTML.

Before you start

Follow the instructions in the Antora Assembler README to install the software you need for the builds.

Notice that this repo already provides the Gemfile, antora-assembler.yml, and pdf-theme.yml files.

Build HTML

npx antora site.yml --stacktrace
Site generation complete!
Open file:///path/to/antora-partials/build/site/index.html in a browser to view your site.

Build PDF

npx antora site-pdf.yml --stacktrace
[13:47:43.752] FATAL (antora): Jail is not an absolute path: modules/ROOT/pages
    Cause: SecurityError
        at Opal.send (/usr/local/lib/node_modules/@antora/site-generator/node_modules/asciidoctor-opal-runtime/src/opal.js:1671:19)
        at Function.$$exception (/usr/local/lib/node_modules/@antora/site-generator/node_modules/asciidoctor-opal-runtime/src/opal.js:4993:14)
        at constructor.$$raise (/usr/local/lib/node_modules/@antora/site-generator/node_modules/asciidoctor-opal-runtime/src/opal.js:4681:31)
        at constructor.$$system_path (/usr/local/lib/node_modules/@antora/site-generator/node_modules/@asciidoctor/core/dist/node/asciidoctor.js:12950:18)
        at constructor.$$normalize_system_path (/usr/local/lib/node_modules/@antora/site-generator/node_modules/@asciidoctor/core/dist/node/asciidoctor.js:5644:37)
        at constructor.$$resolve_include_path (/usr/local/lib/node_modules/@antora/site-generator/node_modules/@asciidoctor/core/dist/node/asciidoctor.js:14714:26)
        at constructor.$$preprocess_include_directive (/usr/local/lib/node_modules/@antora/site-generator/node_modules/@asciidoctor/core/dist/node/asciidoctor.js:14356:21)
        at constructor.$$process_line (/usr/local/lib/node_modules/@antora/site-generator/node_modules/@asciidoctor/core/dist/node/asciidoctor.js:14145:37)
        at constructor.$$peek_line (/usr/local/lib/node_modules/@antora/site-generator/node_modules/@asciidoctor/core/dist/node/asciidoctor.js:13331:37)
        at Opal.send (/usr/local/lib/node_modules/@antora/site-generator/node_modules/asciidoctor-opal-runtime/src/opal.js:1671:19)

For a workaround in the Asciidoc, see asciidoc/modules/ROOT/partials/main.adoc.

antora-partials's People

Contributors

markcraig avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.