GithubHelp home page GithubHelp logo

Comments (6)

owenh000 avatar owenh000 commented on June 5, 2024 1

As implied in my previous comment and stated in the documentation, Asciidoctor is responsible for writing the stylesheet(s), not the extension.

With this asciidoctor-multipage extension, Asciidoctor is only really aware of the top-level page. This page seldom or never requires any highlighting, so the highlighter is never used and indicates that no stylesheet is needed. This is worked around with commit e61c95a, included in release v0.0.16.

from asciidoctor-multipage.

owenh000 avatar owenh000 commented on June 5, 2024

Hi @diguage, please provide a test case with the command used and expected output versus actual output.

from asciidoctor-multipage.

diguage avatar diguage commented on June 5, 2024

Hi @diguage, please provide a test case with the command used and expected output versus actual output.

I'm submitting an example to asciidoctor-maven-examples, you can pull the PR to check it, asciidoctor/asciidoctor-maven-examples#134

I add the custom CSS to resolve the problem. So, you can remove the custom CSS to reproduce the problem.

from asciidoctor-multipage.

owenh000 avatar owenh000 commented on June 5, 2024

@diguage, I am not familiar with Maven and am not able to provide support for Maven. It is currently outside the scope of this project.

please provide a test case with the command used and expected output versus actual output

Can you provide the equivalent asciidoctor command, like one of the ones shown in the README? You can even run it directly from a local clone of the repository—see the Development section.

from asciidoctor-multipage.

diguage avatar diguage commented on June 5, 2024

OK, Let me create a example:

= Example Manual
Doc Writer <[email protected]>
2014-09-09
:icons: font
:source-highlighter: coderay
:coderay-style: monokai
:coderay-linenums-mode: table
:stylesdir: assets/styles/
:linkcss:

This is a user manual for an example project.

[#introduction]
== Introduction

This project does something.
We just haven't decided what that is yet.

[#source-code]
== Source Code

[source,java]
.Java code from project
----
package com.diguage;

/**
 * @author D瓜哥 · https://www.diguage.com/
 */
public class Main {
    public static void main(String[] args)
        System.out.println("Hello, world");
    }
}
----

This page was built by the following command:

 $ mvn
$ asciidoctor -r asciidoctor-multipage -b multipage_html5 -D . -a toc=left index.adoc

$ tree .
.
├── assets
│   └── styles
│       └── asciidoctor.css
├── index.adoc
├── index.html
├── introduction.html
└── source-code.html

If I remove :stylesdir: assets/styles/ and :linkcss:, it is OK.

It genereated the <link rel="stylesheet" href="assets/styles/coderay-asciidoctor.css">, but did not generate the style file:

The segemnt of source-code.html:

<title>Example Manual</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
<link rel="stylesheet" href="assets/styles/asciidoctor.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/styles/coderay-asciidoctor.css">

from asciidoctor-multipage.

owenh000 avatar owenh000 commented on June 5, 2024

@diguage, thanks for the example. I was able to reproduce the problem: with the stock html5 converter, Asciidoctor writes out coderay-asciidoctor.css but with the multipage converter it does not. This may be related to handling of the copycss attribute, which "is set by default unless the safe mode is secure" (quoting the documentation).

It is possible to work around this by explicitly setting the copycss attribute, either in the document (:copycss:) or as a command line option (-a copycss).

Edit: Actually, I don't think this is related to the copycss document attribute.

from asciidoctor-multipage.

Related Issues (20)

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.