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

Do not generate the configurate theme style file for Rouge highlighter #35

Open
diguage opened this issue Jun 14, 2022 · 2 comments
Open
Labels
bug Something isn't working

Comments

@diguage
Copy link

diguage commented Jun 14, 2022

The example:

= Example Manual
Doc Writer <doc.writer@example.org>
2014-09-09
:icons: font
:source-highlighter: rouge
:rouge-style: monokai
: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

The highlighter options are :source-highlighter: rouge and :rouge-style: monokai. But the generated style file is rouge-github.css.

If I use monokai, the generated style file is rouge-github.css. But the source-code.html links to rouge-monokai.css.

$ asciidoctor-multipage -v
Asciidoctor Multipage 0.0.16 using Asciidoctor 2.0.17 [https://asciidoctor.org]
Runtime Environment (ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)

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

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

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

The segemnt of source-code.html:

<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/rouge-monokai.css">

rouge-monokai.css should be generated. It is not rouge-github.css.

@owenh000
Copy link
Owner

Hi @diguage, thanks for the report; I was able to reproduce the behavior you have described.

Asciidoctor 2.0.17, with the stock html5 converter, writes out the stylesheet as rouge-monokai.css and references it correctly in the output HTML. However, with asciidoctor-multipage, rouge-github.css is written out instead while rouge-monokai.css is referenced in the HTML.

@owenh000 owenh000 added the bug Something isn't working label Apr 3, 2024
@owenh000
Copy link
Owner

owenh000 commented Apr 3, 2024

Completing issue #46 might fix this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants