asciidoc

使用Asciidoc代替Markdown和Word撰写开发文档

*爱你&永不变心* 提交于 2020-02-29 06:32:23
开发文档一般都由Word或Markdown(格式)撰写,前则多见于企业项目,后则在开源界很流行。但在实际使用中总觉得不尽人意。 他们的不是 Word的问题 表现上:格式过于复杂,导致写出来的文档排版、格式很不统一,千人千面,不利于标准化 工具上:要么收费(MS)要么广告多(WPS)要么不稳定(一些开源的Office),另外这些都是很重工具 不被开源界待见,你说你写了个开源工具,文档是word的,很不和谐呀……:confused: Markdown的问题 表现上:绝对是矫枉过正了,它的语法太简单了,用MD写一篇文章(如本文)还凑合,但要写一个文档的话束缚太多了,谁用谁知道 工具上:Gitbook不错,将MD文档用GIT托管是个很不错的Idea,不过它的新版本把导出功能给阉割了(需要用命令行处理),不厚道,有点被gitbook平台绑架的感觉 说了这两个东西不是,那么自然会引荐更合适的喽,这就是我们主角 Asciidoc :heart: 你的好 Asciidoc有什么魅力呢? 简洁而不简陋的语法,它专门为编写书籍而生,在语法的支持上很到位,但不像Word那样可以随性,可以让你的文档更统一美观 AsciidocFX工具开源跨平台,使用体验很不错,更可以导出HTML、PDF、EBook等格式 Gitbook也支持这个语法(如果你希望用它的话) 一图胜千言 如何学习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