asciidoc


SpringBoot2中,怎么生成静态文档

流过昼夜 提交于 2020-01-07 20:28:40
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> SpringBoot2中,怎么生成静态文档 在实际开发过程中,我们通过swagger就可以生成我们的接口文档,这个文档就可以提供给前端人员开发使用的。但是,有时候,我们需要把我们的接口文档,提供给第三方合作公司怎么办? 本人现在就遇到这个问题。我们的项目开发完成之后,也是前后端分离的模式。但是,第三方公司需要我们的接口文档,怎么办?那就需要我们把swagger的文档,生成静态文档才可以发送过去。 接口文档 说起来接口文档,大家最熟悉的就是swaggger了吧。这个可以很方便的可以注解的方式,就可以生成我们需要的文档。而且可以在线调试接口。 随着前后端分离架构和微服务架构的流行,我们使用Spring Boot来构建RESTful API项目的场景越来越多。通常我们的一个RESTful API就有可能要服务于多个不同的开发人员或开发团队:IOS开发、Android开发、Web开发甚至其他的后端服务等。 上面就是项目启动之后,swagger给我们提供的可视化界面了。 swagger项目集成 springboot中集成swagger很简单,只需要我们导入依赖,然后在方法上写上注解就可以了。 应用主类中添加 @EnableSwagger2Doc 注解,具体如下 根据项目需要,我们可以修改swagger的默认配置

Using tabs in AsciiDoc (Spring Rest Docs)

匆匆过客 提交于 2019-12-23 10:54:30
问题 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: 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

how to define own asciidoc macro

北城余情 提交于 2019-12-19 02:54:28
问题 How do I define a macro in asciidoc/asciidoctor? I will use a repeating pattern in many parts of my document so I would like to make a parametrized substitution to avoid entering the same stuff many times. In particular, I have the following asciidoc snippet: {set:cellbgcolor:grey} [grid=none, frame=none] |=== | X >| Y |=== {set:cellbgcolor!} And I need to place it in several parts of the document with different text substitutions in place of X and Y. How do I achieve that? 回答1: In my opinion

asciidoc: how to add callouts asciidoc to image

≯℡__Kan透↙ 提交于 2019-12-11 01:09:27
问题 How can i add callouts to images like in docbook ? See an example here: http://norman.walsh.name/2006/06/10/imageobjectco The callout points can be drawn on the image, but when i try to generate document from this: image::img/stg.png[width=400,align="center"] <1> Blabla. <2> Foobar. <3> Aknathnaratnathgarat. ... it drops an error: asciidoc: WARNING: manual.adoc: line 580: no callouts refer to list item 1 asciidoc: WARNING: manual.adoc: line 581: no callouts refer to list item 2 asciidoc:

asciidoc: is there a way to create an anchor that will be visible in libreoffice writer?

北战南征 提交于 2019-12-10 23:31:52
问题 Tl;dr; What is the correct way to create an anchor in docbook? and is there a way that will make the anchor visible in writer? Background I am trying to split up documentation that was previously in single open office documents into smaller asciidoc documents which are both included in the main open office document and also converted to either or both of html & pdf . I have this mostly working. I use asciidoctor to create html. asciidoctor-pdf to create pdf and a combination of asciidoctor

Substitutions inside literals in Asciidoc

守給你的承諾、 提交于 2019-12-10 13:37:13
问题 There doesn't appear to be a way to have variables (attributes, substitutions) parsed within literal text in Asciidoc, or else I'm missing something. I want to be able to set a variable and then call it inside a code block or literal string as such: :version: 1.0.1 [code] ---- tar -xzvf mysoftware-{version}.tar.gz ---- And have it parse to: tar -xzvf mysoftware-1.0.1.tar.gz This can't be impossible, right? 回答1: You can enable it for any block by using the subs attribute to the block. The subs

How to include a javascript in Asciidoc?

核能气质少年 提交于 2019-12-09 17:06:56
问题 I'm using asciidoctor-maven-plugin to convert .adoc files to html file... Would want to include a link to javascript in the generated html file... Basically would like to see something like below in the html file that is generated from the .adoc file <script src="custom.js"></script> Tried setting attributes like linkcss scriptsdir etc..but of no luck... Any help? One way is like in http://mrhaki.blogspot.ie/2014/06/awesome-asciidoc-include-raw-html.html But then have to add it in every .adoc

AsciiDoc add bold text inside a listing block

无人久伴 提交于 2019-12-05 13:13:20
Have some AsciiDoc that has a block like... ---- this is a test with *some* formatted/tabbed text in it blah ---- ...and I would like the text to display like... this is a test with some formatted/tabbed text in it blah ...where the word "some" is bold. summea In AsciiDoc, the double ---- lines signify ListingBlocks , which only preserve certain formatting aspects of your text ( line and whitespace formatting) , according to the AsciiDoc documentation on Delimited Blocks ( with the exception of using [subs="quotes"] , as you noted in your answer ). Other ways to include bold formatting in a

How to include a javascript in Asciidoc?

若如初见. 提交于 2019-12-04 03:46:42
I'm using asciidoctor-maven-plugin to convert .adoc files to html file... Would want to include a link to javascript in the generated html file... Basically would like to see something like below in the html file that is generated from the .adoc file <script src="custom.js"></script> Tried setting attributes like linkcss scriptsdir etc..but of no luck... Any help? One way is like in http://mrhaki.blogspot.ie/2014/06/awesome-asciidoc-include-raw-html.html But then have to add it in every .adoc file...is there a way to get it automatically added just like the CSS (using stylesheet) You can use

How to add an image to asciidoc book cover page?

空扰寡人 提交于 2019-12-03 17:02:52
问题 I would like to create a pdf book using asciidoc. The title page should include the title, subtitle and an image. So far I could not find any documentation on how to achive this. Intuivly I would do something like My book title ============= :author: myself :toc: image:images/titelimage.png[width=400] but this just adds image:images/titelimage.png[width=400] as a subtitle. What I would like to have is something like My book title <titleimage> subtitle Is there a way to do this in ascciidoc?

工具导航Map