SlideShare una empresa de Scribd logo
1 de 13
Descargar para leer sin conexión
10 Useful Asciidoctor Tips 
Andres Almiray 
Canoo Engineering AG 
#devoxx #asciidoctor_tips @aalmiray
#devoxx #asciidoctor_tips @aalmiray
#1 Live Reload + Browser Extension 
• http://livereload.com/ 
! 
• https://github.com/asciidoctor/asciidoctor-chrome-extension 
! 
• https://github.com/asciidoctor/asciidoctor-firefox-addon 
#devoxx #asciidoctor_tips @aalmiray
#2 Build Tool integration 
• https://github.com/asciidoctor/asciidoctor-maven-plugin 
! 
• https://github.com/asciidoctor/asciidoctor-gradle-plugin 
! 
• https://github.com/aalmiray/livereload-gradle-plugin 
#devoxx #asciidoctor_tips @aalmiray
#3 Provide a _links.adoc file 
• Use an attribute per link 
• Include the _links.adoc file at the beginning of your index file 
// 
_links.adoc 
:link_gradle: 
http://www.gradle.org/[Gradle, 
window="_blank"] 
:link_maven: 
http://maven.apache.org/[Maven, 
window="_blank"] 
// 
index.adoc 
include::_links.adoc[] 
! 
Asciidoctor 
has 
great 
integration 
with 
{link_gradle} 
and 
{link_maven}. 
#devoxx #asciidoctor_tips @aalmiray
#4 Blank lines at top and bottom 
• Simplifies including files into others 
// 
without 
blank 
lines 
// 
with 
blank 
lines 
// 
index.adoc 
// 
index.adoc 
! 
! 
include::chapter1.adoc[] 
include::chapter1.adoc[] 
! 
include::chapter2.adoc[] 
include::chapter2.adoc[] 
include::chapter3.adoc[] 
! 
include::chapter3.adoc[] 
#devoxx #asciidoctor_tips @aalmiray
#5 Comment your documentation! 
• Yes, comments on documentation ;-) 
= 
Chapter 
Title 
The 
following 
chapter 
discusses 
lorem 
ipsum 
dolor 
sit 
amet 
consecutur 
ad 
nauseam. 
// 
IDEA: 
insert 
a 
lorem 
ipsum 
generator 
here? 
! 
Lorem 
ipsum 
dolor 
sit 
amet 
consecutur. 
Lorem 
ipsum 
dolor 
sit 
amet 
consecutur. 
Lorem 
ipsum 
dolor 
sit 
amet 
consecutur. 
Lorem 
ipsum 
dolor 
sit 
amet 
consecutur. 
! 
//// 
Why 
build 
a 
custom 
lorem-­‐ipsum 
extension 
when 
copy&paste 
is 
so 
cheap? 
No 
need 
to 
tire 
those 
cell 
brains. 
Oh 
look, 
beer! 
//// 
#devoxx #asciidoctor_tips @aalmiray
#6 Use conditional blocks 
• ifdef::attribute_name[] checks if attribute has a value 
• ifndef::attribute_name[] performs the opposite check 
• ifeval::[{attribute_name} > 2] evaluates the attribute 
! 
• You can surround blocks if ifdef/ifndef/ifeval & endif 
• These are great for conditionally rendering content based on 
build variables (see tip #2). 
#devoxx #asciidoctor_tips @aalmiray
#7 Callouts in paragraphs 
• Apply the following inside any paragraph 
[conum,data-value=2]_2_ 
where 2 can be any number 
! 
• Reverse engineered from 
<em class="conum">2</em> 
#devoxx #asciidoctor_tips @aalmiray
#8 Include Raw Content 
• Either use the pass:[] macro or the ++++ block 
pass:[<iframe 
src=“http://secr.et/not/a/malicious/page/honest.html”></iframe>] 
! 
++++ 
<script 
type="text/javascript"> 
var 
pageTracker 
= 
_gat._getTracker("XX-­‐123456-­‐1"); 
pageTracker._initData(); 
pageTracker._trackPageview(); 
</script> 
++++ 
#devoxx #asciidoctor_tips @aalmiray
#9 The Include Macro is Awesome 
• Include any file. 
• Apply call outs in source code. Use standard code comments 
• Change indentation; include certain lines, tags 
.src/main/java/sample/Foo.java 
[source,java,linenums,options="nowrap"] 
-­‐-­‐-­‐-­‐ 
include::{rootdir}/src/main/java/sample/Foo.java[lines=16..-­‐1] 
-­‐-­‐-­‐-­‐ 
<1> 
Define 
the 
class 
<2> 
Properties 
<3> 
Business 
methods 
#devoxx #asciidoctor_tips @aalmiray
#10 Follow Mr. HAKI’s blog 
• @mrhaki blogs periodically at 
http://mrhaki.blogspot.ch/search/label/Asciidoc 
! 
• Lots of useful tricks and exercises on brand new features 
#devoxx #asciidoctor_tips @aalmiray
10 Useful Asciidoctor Tips 
Andres Almiray 
Canoo Engineering AG 
#devoxx #asciidoctor_tips @aalmiray

Más contenido relacionado

La actualidad más candente

Introduction to Malware Analysis
Introduction to Malware AnalysisIntroduction to Malware Analysis
Introduction to Malware AnalysisAndrew McNicol
 
An Introduction to Software Testing
An Introduction to Software TestingAn Introduction to Software Testing
An Introduction to Software TestingThorsten Frommen
 
Btpsec Sample Penetration Test Report
Btpsec Sample Penetration Test ReportBtpsec Sample Penetration Test Report
Btpsec Sample Penetration Test Reportbtpsec
 
Css: elementos básicos
Css: elementos básicosCss: elementos básicos
Css: elementos básicosjcremiro
 
Windows Threat Hunting
Windows Threat HuntingWindows Threat Hunting
Windows Threat HuntingGIBIN JOHN
 
Security in CI/CD Pipelines: Tips for DevOps Engineers
Security in CI/CD Pipelines: Tips for DevOps EngineersSecurity in CI/CD Pipelines: Tips for DevOps Engineers
Security in CI/CD Pipelines: Tips for DevOps EngineersDevOps.com
 

La actualidad más candente (8)

Introduction to Malware Analysis
Introduction to Malware AnalysisIntroduction to Malware Analysis
Introduction to Malware Analysis
 
An Introduction to Software Testing
An Introduction to Software TestingAn Introduction to Software Testing
An Introduction to Software Testing
 
Docker Forensics
Docker ForensicsDocker Forensics
Docker Forensics
 
Btpsec Sample Penetration Test Report
Btpsec Sample Penetration Test ReportBtpsec Sample Penetration Test Report
Btpsec Sample Penetration Test Report
 
Css: elementos básicos
Css: elementos básicosCss: elementos básicos
Css: elementos básicos
 
Domain driven desing
Domain driven desingDomain driven desing
Domain driven desing
 
Windows Threat Hunting
Windows Threat HuntingWindows Threat Hunting
Windows Threat Hunting
 
Security in CI/CD Pipelines: Tips for DevOps Engineers
Security in CI/CD Pipelines: Tips for DevOps EngineersSecurity in CI/CD Pipelines: Tips for DevOps Engineers
Security in CI/CD Pipelines: Tips for DevOps Engineers
 

Destacado

Asciidoctor, because documentation does not have to suck
Asciidoctor, because documentation does not have to suckAsciidoctor, because documentation does not have to suck
Asciidoctor, because documentation does not have to suckAndres Almiray
 
Document like the Spring team using Asciidoctor
Document like the Spring  team using AsciidoctorDocument like the Spring  team using Asciidoctor
Document like the Spring team using AsciidoctorAlex Soto
 
Documentation brought to life: Asciidoctor & Gradle (Greach 2015)
Documentation brought to life: Asciidoctor & Gradle (Greach 2015)Documentation brought to life: Asciidoctor & Gradle (Greach 2015)
Documentation brought to life: Asciidoctor & Gradle (Greach 2015)Markus Schlichting
 
Zurich 2016 eclipse demo camp - asciidoc and docker
Zurich 2016 eclipse demo camp - asciidoc and dockerZurich 2016 eclipse demo camp - asciidoc and docker
Zurich 2016 eclipse demo camp - asciidoc and dockerMax Rydahl Andersen
 
Mule scopes async_scope
Mule scopes async_scopeMule scopes async_scope
Mule scopes async_scopekunal vishe
 
Mule data weave_10
Mule data weave_10Mule data weave_10
Mule data weave_10kunal vishe
 
Mule data weave_7
Mule data weave_7Mule data weave_7
Mule data weave_7kunal vishe
 
Des principes de la démarche DevOps à sa mise en oeuvre
Des principes de la démarche DevOps à sa mise en oeuvreDes principes de la démarche DevOps à sa mise en oeuvre
Des principes de la démarche DevOps à sa mise en oeuvreStephane Manciot
 
Mule soft mel_session_3
Mule soft mel_session_3Mule soft mel_session_3
Mule soft mel_session_3abhipokharna
 
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015Stephane Manciot
 
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Alex S
 
DevOps avec Ansible et Docker
DevOps avec Ansible et DockerDevOps avec Ansible et Docker
DevOps avec Ansible et DockerStephane Manciot
 
Ansible 2.0 のサマライズとこれから
Ansible 2.0 のサマライズとこれからAnsible 2.0 のサマライズとこれから
Ansible 2.0 のサマライズとこれからTakeshi Kuramochi
 
Better documentation with asciidoc and asciidoctor
Better documentation with asciidoc and asciidoctorBetter documentation with asciidoc and asciidoctor
Better documentation with asciidoc and asciidoctorUlises Fasoli
 
Дизайн REST API для высокопроизводительных систем / Александр Лебедев (Новые ...
Дизайн REST API для высокопроизводительных систем / Александр Лебедев (Новые ...Дизайн REST API для высокопроизводительных систем / Александр Лебедев (Новые ...
Дизайн REST API для высокопроизводительных систем / Александр Лебедев (Новые ...Ontico
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentationJohn Lynch
 
Jumelage de l'ochv et la roue libre
Jumelage de l'ochv et la roue libreJumelage de l'ochv et la roue libre
Jumelage de l'ochv et la roue libreAntoine Meausoone
 

Destacado (20)

Asciidoctor, because documentation does not have to suck
Asciidoctor, because documentation does not have to suckAsciidoctor, because documentation does not have to suck
Asciidoctor, because documentation does not have to suck
 
Document like the Spring team using Asciidoctor
Document like the Spring  team using AsciidoctorDocument like the Spring  team using Asciidoctor
Document like the Spring team using Asciidoctor
 
Documentation brought to life: Asciidoctor & Gradle (Greach 2015)
Documentation brought to life: Asciidoctor & Gradle (Greach 2015)Documentation brought to life: Asciidoctor & Gradle (Greach 2015)
Documentation brought to life: Asciidoctor & Gradle (Greach 2015)
 
Zurich 2016 eclipse demo camp - asciidoc and docker
Zurich 2016 eclipse demo camp - asciidoc and dockerZurich 2016 eclipse demo camp - asciidoc and docker
Zurich 2016 eclipse demo camp - asciidoc and docker
 
Mule scopes async_scope
Mule scopes async_scopeMule scopes async_scope
Mule scopes async_scope
 
Mule mel 3
Mule mel 3Mule mel 3
Mule mel 3
 
Variables in dataweave
Variables in dataweaveVariables in dataweave
Variables in dataweave
 
Mule data weave_10
Mule data weave_10Mule data weave_10
Mule data weave_10
 
Mule data weave_7
Mule data weave_7Mule data weave_7
Mule data weave_7
 
Des principes de la démarche DevOps à sa mise en oeuvre
Des principes de la démarche DevOps à sa mise en oeuvreDes principes de la démarche DevOps à sa mise en oeuvre
Des principes de la démarche DevOps à sa mise en oeuvre
 
Mule soft mel_session_3
Mule soft mel_session_3Mule soft mel_session_3
Mule soft mel_session_3
 
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
 
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015
 
DevOps avec Ansible et Docker
DevOps avec Ansible et DockerDevOps avec Ansible et Docker
DevOps avec Ansible et Docker
 
Ansible 2.0 のサマライズとこれから
Ansible 2.0 のサマライズとこれからAnsible 2.0 のサマライズとこれから
Ansible 2.0 のサマライズとこれから
 
Better documentation with asciidoc and asciidoctor
Better documentation with asciidoc and asciidoctorBetter documentation with asciidoc and asciidoctor
Better documentation with asciidoc and asciidoctor
 
Дизайн REST API для высокопроизводительных систем / Александр Лебедев (Новые ...
Дизайн REST API для высокопроизводительных систем / Александр Лебедев (Новые ...Дизайн REST API для высокопроизводительных систем / Александр Лебедев (Новые ...
Дизайн REST API для высокопроизводительных систем / Александр Лебедев (Новые ...
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
reveal.js 3.0.0
reveal.js 3.0.0reveal.js 3.0.0
reveal.js 3.0.0
 
Jumelage de l'ochv et la roue libre
Jumelage de l'ochv et la roue libreJumelage de l'ochv et la roue libre
Jumelage de l'ochv et la roue libre
 

Similar a 10 Useful Asciidoctor Tips

BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesAlfresco Software
 
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)Codemotion
 
Road to Opscon (Pisa '15) - DevOoops
Road to Opscon (Pisa '15) - DevOoopsRoad to Opscon (Pisa '15) - DevOoops
Road to Opscon (Pisa '15) - DevOoopsGianluca Varisco
 
Front End Development for Back End Developers - Devoxx UK 2017
 Front End Development for Back End Developers - Devoxx UK 2017 Front End Development for Back End Developers - Devoxx UK 2017
Front End Development for Back End Developers - Devoxx UK 2017Matt Raible
 
Kohana 3.2 documentation
Kohana 3.2 documentationKohana 3.2 documentation
Kohana 3.2 documentationdmthuan1
 
Web components the future is here
Web components   the future is hereWeb components   the future is here
Web components the future is hereGil Fink
 
OWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsOWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsLewis Ardern
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsTaylor Lovett
 
How to analyze your codebase with Exakat using Docker - Longhorn PHP
How to analyze your codebase with Exakat using Docker - Longhorn PHPHow to analyze your codebase with Exakat using Docker - Longhorn PHP
How to analyze your codebase with Exakat using Docker - Longhorn PHPDana Luther
 
Getting Started With Jenkins And Drupal
Getting Started With Jenkins And DrupalGetting Started With Jenkins And Drupal
Getting Started With Jenkins And DrupalPhilip Norton
 
PLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in GrailsPLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in GrailsAlfresco Software
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer ToolboxPablo Godel
 
InSpec For DevOpsDays Amsterdam 2017
InSpec For DevOpsDays Amsterdam 2017InSpec For DevOpsDays Amsterdam 2017
InSpec For DevOpsDays Amsterdam 2017Mandi Walls
 
Intro to html5 Boilerplate
Intro to html5 BoilerplateIntro to html5 Boilerplate
Intro to html5 BoilerplateMichael Enslow
 
Front End Good Practices
Front End Good PracticesFront End Good Practices
Front End Good PracticesHernan Mammana
 
Going on an HTTP Diet: Front-End Web Performance
Going on an HTTP Diet: Front-End Web PerformanceGoing on an HTTP Diet: Front-End Web Performance
Going on an HTTP Diet: Front-End Web PerformanceAdam Norwood
 
Now That's What I Call WordPress Security 2010
Now That's What I Call WordPress Security 2010Now That's What I Call WordPress Security 2010
Now That's What I Call WordPress Security 2010Brad Williams
 
Developing Liferay Plugins with Maven
Developing Liferay Plugins with MavenDeveloping Liferay Plugins with Maven
Developing Liferay Plugins with MavenMika Koivisto
 

Similar a 10 Useful Asciidoctor Tips (20)

BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best Practices
 
Ci2
Ci2Ci2
Ci2
 
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
 
Road to Opscon (Pisa '15) - DevOoops
Road to Opscon (Pisa '15) - DevOoopsRoad to Opscon (Pisa '15) - DevOoops
Road to Opscon (Pisa '15) - DevOoops
 
Front End Development for Back End Developers - Devoxx UK 2017
 Front End Development for Back End Developers - Devoxx UK 2017 Front End Development for Back End Developers - Devoxx UK 2017
Front End Development for Back End Developers - Devoxx UK 2017
 
Kohana 3.2 documentation
Kohana 3.2 documentationKohana 3.2 documentation
Kohana 3.2 documentation
 
Web components the future is here
Web components   the future is hereWeb components   the future is here
Web components the future is here
 
OWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsOWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript Applications
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
How to analyze your codebase with Exakat using Docker - Longhorn PHP
How to analyze your codebase with Exakat using Docker - Longhorn PHPHow to analyze your codebase with Exakat using Docker - Longhorn PHP
How to analyze your codebase with Exakat using Docker - Longhorn PHP
 
Continuous feature-development
Continuous feature-developmentContinuous feature-development
Continuous feature-development
 
Getting Started With Jenkins And Drupal
Getting Started With Jenkins And DrupalGetting Started With Jenkins And Drupal
Getting Started With Jenkins And Drupal
 
PLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in GrailsPLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in Grails
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
InSpec For DevOpsDays Amsterdam 2017
InSpec For DevOpsDays Amsterdam 2017InSpec For DevOpsDays Amsterdam 2017
InSpec For DevOpsDays Amsterdam 2017
 
Intro to html5 Boilerplate
Intro to html5 BoilerplateIntro to html5 Boilerplate
Intro to html5 Boilerplate
 
Front End Good Practices
Front End Good PracticesFront End Good Practices
Front End Good Practices
 
Going on an HTTP Diet: Front-End Web Performance
Going on an HTTP Diet: Front-End Web PerformanceGoing on an HTTP Diet: Front-End Web Performance
Going on an HTTP Diet: Front-End Web Performance
 
Now That's What I Call WordPress Security 2010
Now That's What I Call WordPress Security 2010Now That's What I Call WordPress Security 2010
Now That's What I Call WordPress Security 2010
 
Developing Liferay Plugins with Maven
Developing Liferay Plugins with MavenDeveloping Liferay Plugins with Maven
Developing Liferay Plugins with Maven
 

Más de Andres Almiray

Creando, creciendo, y manteniendo una comunidad de codigo abierto
Creando, creciendo, y manteniendo una comunidad de codigo abiertoCreando, creciendo, y manteniendo una comunidad de codigo abierto
Creando, creciendo, y manteniendo una comunidad de codigo abiertoAndres Almiray
 
Liberando a produccion con confianza
Liberando a produccion con confianzaLiberando a produccion con confianza
Liberando a produccion con confianzaAndres Almiray
 
Liberando a produccion con confidencia
Liberando a produccion con confidenciaLiberando a produccion con confidencia
Liberando a produccion con confidenciaAndres Almiray
 
OracleDB Ecosystem for Java Developers
OracleDB Ecosystem for Java DevelopersOracleDB Ecosystem for Java Developers
OracleDB Ecosystem for Java DevelopersAndres Almiray
 
Softcon.ph - Maven Puzzlers
Softcon.ph - Maven PuzzlersSoftcon.ph - Maven Puzzlers
Softcon.ph - Maven PuzzlersAndres Almiray
 
Oracle Database Ecosystem for Java Developers
Oracle Database Ecosystem for Java DevelopersOracle Database Ecosystem for Java Developers
Oracle Database Ecosystem for Java DevelopersAndres Almiray
 
JReleaser - Releasing at the speed of light
JReleaser - Releasing at the speed of lightJReleaser - Releasing at the speed of light
JReleaser - Releasing at the speed of lightAndres Almiray
 
Building modular applications with the Java Platform Module System and Layrry
Building modular applications with the Java Platform Module System and LayrryBuilding modular applications with the Java Platform Module System and Layrry
Building modular applications with the Java Platform Module System and LayrryAndres Almiray
 
Going Reactive with g rpc
Going Reactive with g rpcGoing Reactive with g rpc
Going Reactive with g rpcAndres Almiray
 
Building modular applications with JPMS and Layrry
Building modular applications with JPMS and LayrryBuilding modular applications with JPMS and Layrry
Building modular applications with JPMS and LayrryAndres Almiray
 
Taking Micronaut out for a spin
Taking Micronaut out for a spinTaking Micronaut out for a spin
Taking Micronaut out for a spinAndres Almiray
 
Apache Groovy's Metaprogramming Options and You
Apache Groovy's Metaprogramming Options and YouApache Groovy's Metaprogramming Options and You
Apache Groovy's Metaprogramming Options and YouAndres Almiray
 
What I wish I knew about Maven years ago
What I wish I knew about Maven years agoWhat I wish I knew about Maven years ago
What I wish I knew about Maven years agoAndres Almiray
 
What I wish I knew about maven years ago
What I wish I knew about maven years agoWhat I wish I knew about maven years ago
What I wish I knew about maven years agoAndres Almiray
 
The impact of sci fi in tech
The impact of sci fi in techThe impact of sci fi in tech
The impact of sci fi in techAndres Almiray
 
Gradle Ex Machina - Devoxx 2019
Gradle Ex Machina - Devoxx 2019Gradle Ex Machina - Devoxx 2019
Gradle Ex Machina - Devoxx 2019Andres Almiray
 
Creating Better Builds with Gradle
Creating Better Builds with GradleCreating Better Builds with Gradle
Creating Better Builds with GradleAndres Almiray
 
Interacting with the Oracle Cloud Java SDK with Gradle
Interacting with the Oracle Cloud Java SDK with GradleInteracting with the Oracle Cloud Java SDK with Gradle
Interacting with the Oracle Cloud Java SDK with GradleAndres Almiray
 

Más de Andres Almiray (20)

Creando, creciendo, y manteniendo una comunidad de codigo abierto
Creando, creciendo, y manteniendo una comunidad de codigo abiertoCreando, creciendo, y manteniendo una comunidad de codigo abierto
Creando, creciendo, y manteniendo una comunidad de codigo abierto
 
Liberando a produccion con confianza
Liberando a produccion con confianzaLiberando a produccion con confianza
Liberando a produccion con confianza
 
Liberando a produccion con confidencia
Liberando a produccion con confidenciaLiberando a produccion con confidencia
Liberando a produccion con confidencia
 
OracleDB Ecosystem for Java Developers
OracleDB Ecosystem for Java DevelopersOracleDB Ecosystem for Java Developers
OracleDB Ecosystem for Java Developers
 
Softcon.ph - Maven Puzzlers
Softcon.ph - Maven PuzzlersSoftcon.ph - Maven Puzzlers
Softcon.ph - Maven Puzzlers
 
Maven Puzzlers
Maven PuzzlersMaven Puzzlers
Maven Puzzlers
 
Oracle Database Ecosystem for Java Developers
Oracle Database Ecosystem for Java DevelopersOracle Database Ecosystem for Java Developers
Oracle Database Ecosystem for Java Developers
 
JReleaser - Releasing at the speed of light
JReleaser - Releasing at the speed of lightJReleaser - Releasing at the speed of light
JReleaser - Releasing at the speed of light
 
Building modular applications with the Java Platform Module System and Layrry
Building modular applications with the Java Platform Module System and LayrryBuilding modular applications with the Java Platform Module System and Layrry
Building modular applications with the Java Platform Module System and Layrry
 
Going Reactive with g rpc
Going Reactive with g rpcGoing Reactive with g rpc
Going Reactive with g rpc
 
Building modular applications with JPMS and Layrry
Building modular applications with JPMS and LayrryBuilding modular applications with JPMS and Layrry
Building modular applications with JPMS and Layrry
 
Taking Micronaut out for a spin
Taking Micronaut out for a spinTaking Micronaut out for a spin
Taking Micronaut out for a spin
 
Apache Groovy's Metaprogramming Options and You
Apache Groovy's Metaprogramming Options and YouApache Groovy's Metaprogramming Options and You
Apache Groovy's Metaprogramming Options and You
 
What I wish I knew about Maven years ago
What I wish I knew about Maven years agoWhat I wish I knew about Maven years ago
What I wish I knew about Maven years ago
 
What I wish I knew about maven years ago
What I wish I knew about maven years agoWhat I wish I knew about maven years ago
What I wish I knew about maven years ago
 
The impact of sci fi in tech
The impact of sci fi in techThe impact of sci fi in tech
The impact of sci fi in tech
 
Gradle Ex Machina - Devoxx 2019
Gradle Ex Machina - Devoxx 2019Gradle Ex Machina - Devoxx 2019
Gradle Ex Machina - Devoxx 2019
 
Creating Better Builds with Gradle
Creating Better Builds with GradleCreating Better Builds with Gradle
Creating Better Builds with Gradle
 
Interacting with the Oracle Cloud Java SDK with Gradle
Interacting with the Oracle Cloud Java SDK with GradleInteracting with the Oracle Cloud Java SDK with Gradle
Interacting with the Oracle Cloud Java SDK with Gradle
 
Gradle ex-machina
Gradle ex-machinaGradle ex-machina
Gradle ex-machina
 

10 Useful Asciidoctor Tips

  • 1. 10 Useful Asciidoctor Tips Andres Almiray Canoo Engineering AG #devoxx #asciidoctor_tips @aalmiray
  • 3. #1 Live Reload + Browser Extension • http://livereload.com/ ! • https://github.com/asciidoctor/asciidoctor-chrome-extension ! • https://github.com/asciidoctor/asciidoctor-firefox-addon #devoxx #asciidoctor_tips @aalmiray
  • 4. #2 Build Tool integration • https://github.com/asciidoctor/asciidoctor-maven-plugin ! • https://github.com/asciidoctor/asciidoctor-gradle-plugin ! • https://github.com/aalmiray/livereload-gradle-plugin #devoxx #asciidoctor_tips @aalmiray
  • 5. #3 Provide a _links.adoc file • Use an attribute per link • Include the _links.adoc file at the beginning of your index file // _links.adoc :link_gradle: http://www.gradle.org/[Gradle, window="_blank"] :link_maven: http://maven.apache.org/[Maven, window="_blank"] // index.adoc include::_links.adoc[] ! Asciidoctor has great integration with {link_gradle} and {link_maven}. #devoxx #asciidoctor_tips @aalmiray
  • 6. #4 Blank lines at top and bottom • Simplifies including files into others // without blank lines // with blank lines // index.adoc // index.adoc ! ! include::chapter1.adoc[] include::chapter1.adoc[] ! include::chapter2.adoc[] include::chapter2.adoc[] include::chapter3.adoc[] ! include::chapter3.adoc[] #devoxx #asciidoctor_tips @aalmiray
  • 7. #5 Comment your documentation! • Yes, comments on documentation ;-) = Chapter Title The following chapter discusses lorem ipsum dolor sit amet consecutur ad nauseam. // IDEA: insert a lorem ipsum generator here? ! Lorem ipsum dolor sit amet consecutur. Lorem ipsum dolor sit amet consecutur. Lorem ipsum dolor sit amet consecutur. Lorem ipsum dolor sit amet consecutur. ! //// Why build a custom lorem-­‐ipsum extension when copy&paste is so cheap? No need to tire those cell brains. Oh look, beer! //// #devoxx #asciidoctor_tips @aalmiray
  • 8. #6 Use conditional blocks • ifdef::attribute_name[] checks if attribute has a value • ifndef::attribute_name[] performs the opposite check • ifeval::[{attribute_name} > 2] evaluates the attribute ! • You can surround blocks if ifdef/ifndef/ifeval & endif • These are great for conditionally rendering content based on build variables (see tip #2). #devoxx #asciidoctor_tips @aalmiray
  • 9. #7 Callouts in paragraphs • Apply the following inside any paragraph [conum,data-value=2]_2_ where 2 can be any number ! • Reverse engineered from <em class="conum">2</em> #devoxx #asciidoctor_tips @aalmiray
  • 10. #8 Include Raw Content • Either use the pass:[] macro or the ++++ block pass:[<iframe src=“http://secr.et/not/a/malicious/page/honest.html”></iframe>] ! ++++ <script type="text/javascript"> var pageTracker = _gat._getTracker("XX-­‐123456-­‐1"); pageTracker._initData(); pageTracker._trackPageview(); </script> ++++ #devoxx #asciidoctor_tips @aalmiray
  • 11. #9 The Include Macro is Awesome • Include any file. • Apply call outs in source code. Use standard code comments • Change indentation; include certain lines, tags .src/main/java/sample/Foo.java [source,java,linenums,options="nowrap"] -­‐-­‐-­‐-­‐ include::{rootdir}/src/main/java/sample/Foo.java[lines=16..-­‐1] -­‐-­‐-­‐-­‐ <1> Define the class <2> Properties <3> Business methods #devoxx #asciidoctor_tips @aalmiray
  • 12. #10 Follow Mr. HAKI’s blog • @mrhaki blogs periodically at http://mrhaki.blogspot.ch/search/label/Asciidoc ! • Lots of useful tricks and exercises on brand new features #devoxx #asciidoctor_tips @aalmiray
  • 13. 10 Useful Asciidoctor Tips Andres Almiray Canoo Engineering AG #devoxx #asciidoctor_tips @aalmiray