@binout
https://github.com/binout
Langage de balisage, créé en 2002 avec un processeur en Python
Parce que :
= Hello, Bdx.io !
Benoit Prioux <benoit.prioux@gmail.com>
Introduction à http://asciidoc.org[AsciiDoc].
== Première Section
* foo
* bar
== Deuxième Section
1. item 1
2. item 2
NOTE: C'est l'heure de la démo !
Ruby
asciidoc
vers différents backends : docbook
, html5
, epub
, pdf
et même deckjs
!
12 août 2014 : sortie de la version 1.5.0
Ruby
gem install asciidoctor
$ asciidoctor -D output README.adoc
require 'asciidoctor'
...
Asciidoctor.convert_file 'README.adoc', to_file: true, safe: 'safe'
Java
Asciidoctor asciidoctor = Asciidoctor.Factory.create();
Options options = options().backend("html5").get();
String rendered = asciidoctor.convert("*Gras* ou _italique_ ?", options);
System.out.println(rendered);
<div class="paragraph">
<p><strong>Gras</strong> ou <em>italique</em> ?</p>
</div>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.0</version>
<executions>
<execution>
<id>output-html</id>
<phase>generate-resources</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
</execution>
</executions>
</plugin>
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.0'
}
}
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
<project xmlns:asciidoctor="antlib:org.asciidoctor.ant">
...
<target name="doc">
<taskdef uri="antlib:org.asciidoctor.ant"
resource="org/asciidoctor/ant/antlib.xml"
classpath="lib/asciidoctor-ant-1.5.0.jar"/>
<asciidoctor:convert sourceDirectory="src/asciidoc" outputDirectory="target"/>
</target>
...
</project>
/**
* This class has the following features:
*
* - Support for *foo*
* - Support for bar
*/
public class Thing implements Something { ... }
Javascript
var content = "http://asciidoctor.org[*Asciidoctor*] " +
"running on http://opalrb.org[_Opal_] " +
"brings AsciiDoc to the browser!";
var options = Opal.hash2(['doctype', 'attributes'], {doctype: 'inline', attributes: ['showtitle']});
var html = Opal.Asciidoctor.$convert(asciidoc, options);
console.log(html);
/