SUSE / suse-best-practices

SUSE Best Practices documentation series
43 stars 74 forks source link

Render adoc toc2 and code copy functionality in html #162

Open jamesongithub opened 3 years ago

jamesongithub commented 3 years ago
  1. The :toc2: attribute in adoc format formats the toc on the left margin instead of the top of the document. daps seems to ignore this but renders as xhtml (which is a supported backend for the toc2 attribute). Anyway to get this working?

expected: image

actual: image

  1. Is there anyway to have the copy code block ignore the shell prompt characters? Perhaps we can escape it? Currently the prompt characters are copied.

e.g. image

Here the $ character is copied

Btw the copy code button does not work on the html pages generated locally with daps. Any idea?

chabowski commented 3 years ago

@sknorr would you mind having a look at this issue from James?

@jamesongithub I think you and I had talked about it, that it is the stylesheet PDF layout where first comes title, then subtitle - and then the product names and versions. It is different in the HTML layout by purpose: on top of the title / subtitle there is written the product name and version, to make it clear to the reader what the document is talking about.

If this is correct, and there is no action needed, I would close the issue. Thanks!

jamesongithub commented 3 years ago

hi meike, this one is different. the toc2 adoc functionality format the toc on the side so it's always viewable. please see the first screenshot. nothing related to the subtitle.

the 2nd thing was the copy code functionality -- it copies the shell prompt character which is undesired. I think due to this i had left off the shell prompt character in the guides

chabowski commented 3 years ago

Hi James - ah sorry I got confused :-). The layout of the docs (and thus of the toc) is not defined by adoc attributes but by the stylesheets in the background. I don't know how much effort it is to change that - this is a question for Stefan @sknorr