Using tabs in AsciiDoc (Spring Rest Docs)

2019-06-21 09:42发布

I'm using Spring Rest Docs to generate documentation. I would like to do something like Bootstrap's Togglable tabs.

Spring documentation uses togglable tabs, but I don't know how to do it. Here is an example (MockMvc / REST Assured): http://docs.spring.io/spring-restdocs/docs/1.1.0.RELEASE/reference/html5/#documenting-your-api Thanks for helping.

1条回答
地球回转人心会变
2楼-- · 2019-06-21 10:34

There's no built-in support for tabs in Asciidoctor but it's very extensible which allows you to add this sort of thing quite easily.

The tabs in the Spring REST Docs documentation are implemented as a small extension using Groovy, CSS, and Javascript. If you want to take a look at the code, it was added in this commit.

Since that commit was made, the extension's been moved into a separate project. Releases of that project are available from https://repo.spring.io/release. A few details on how to use the extension are available in the README.

查看更多
登录 后发表回答