bytesparadise / libasciidoc

A Golang library for processing Asciidoc files.
Apache License 2.0
204 stars 25 forks source link

Provide a CSS for the generated HTML document #63

Open xcoulon opened 6 years ago

xcoulon commented 6 years ago

Libasciidoc does not provide a CSS yet, so by default there is no style in the document. The current workaround is to use the -css command-line flag. So what's missing here is a default/out-of-the-box CSS

gdamore commented 4 years ago

Should we just copy the asciidoctor CSS? (I don't particularly love that particular CSS, but it might be what people expect.)

In order to get the output I want, I found it necessary to write my own.

In an ideal world, the default UA style sheet would be adequate to get reasonable rendering. I think a few things -- tables and admonition block come to mind -- might make that harder.

xcoulon commented 4 years ago

yes, reusing the Asciidoctor CSS would be an option, but I thought we could have something a little more modern, and to be honest I also opened this issue to give me a change to dive a bit into CSS again ;)

bwklein commented 4 years ago

For some additional feedback on this. I use the HTML5s backend and use my own CSS for all projects. I don't have anything with the default HTML and CSS provided by Asciidoctor.

DavidGamba commented 3 years ago

Newcomer instructions:

  1. get a theme from: https://github.com/darshandsoni/asciidoctor-skins

    wget https://raw.githubusercontent.com/darshandsoni/asciidoctor-skins/gh-pages/css/asciidoctor.css
  2. build with css

    libasciidoc file.adoc --css ./asciidoctor.css
  3. Optionally, generate a PDF

    wkhtmltopdf --enable-local-file-access file.html file.pdf