2

I use asciidoc to generate html files and know little about html.

Can I make a paragraph fold into one line and expand only when user click on it?

If JS is needed, how to insert script into asciidoc elegantly? I mean, I don't want to edit the html file generate by asciidoc.

Mogsdad
  • 44,709
  • 21
  • 151
  • 275
bigeast
  • 627
  • 5
  • 14

2 Answers2

1

You don't need any Javascript.

Use it.

.some heading
[%collapsible]
====
some content
====

This code will give the following result.

result

See details this.

0

Yes, this would be a Javascript thing you'd need to do. You'll want to use a docinfo file. Basically it's a file named <doc-name>-docinfo.html. Anything in that file will be placed in the <head> tag of the resulting html.

LightGuard
  • 5,298
  • 19
  • 19