SlideShare a Scribd company logo
1 of 39
Download to read offline
Jérémie Bresson – 03.11.2015
Writing documentation
with Asciidoctor
AsciiDoc
AsciiDoc example
= Getting Started with Java
Author Name <author@example.org>
== Hello World example
Copy the *HelloWorld.java* file.
TIP: The application prints _Hello World!_ to the console.
* Compile this source to a class file using `javac`.
* Run the compiled class file using `java`.
If you need help with the Java syntax check the
link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc].
AsciiDoc example
AsciiDoc example
= Getting Started with Java
Author Name <author@example.org>
== Hello World example
Copy the *HelloWorld.java* file.
TIP: The application prints _Hello World!_ to the console.
* Compile this source to a class file using `javac`.
* Run the compiled class file using `java`.
If you need help with the Java syntax check the
link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc].
Headings
= Getting Started with Java
Author Name <author@example.org>
== Hello World example
Copy the *HelloWorld.java* file.
TIP: The application prints _Hello World!_ to the console.
* Compile this source to a class file using `javac`.
* Run the compiled class file using `java`.
If you need help with the Java syntax check the
link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc].
Document Title
Section Level 1
= Getting Started with Java
Author Name <author@example.org>
== Hello World example
Copy the *HelloWorld.java* file.
TIP: The application prints _Hello World!_ to the console.
* Compile this source to a class file using `javac`.
* Run the compiled class file using `java`.
If you need help with the Java syntax check the
link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc].
Lists
Unordered list items
Inline formatting
= Getting Started with Java
Author Name <author@example.org>
== Hello World example
Copy the *HelloWorld.java* file.
TIP: The application prints _Hello World!_ to the console.
* Compile this source to a class file using `javac`.
* Run the compiled class file using `java`.
If you need help with the Java syntax check the
link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc].
bold
italic
code
= Getting Started with Java
Author Name <author@example.org>
== Hello World example
Copy the *HelloWorld.java* file.
TIP: The application prints _Hello World!_ to the console.
* Compile this source to a class file using `javac`.
* Run the compiled class file using `java`.
If you need help with the Java syntax check the
link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc].
Links
link with title
= Getting Started with Java
Author Name <author@example.org>
== Hello World example
Copy the *HelloWorld.java* file.
TIP: The application prints _Hello World!_ to the console.
* Compile this source to a class file using `javac`.
* Run the compiled class file using `java`.
If you need help with the Java syntax check the
link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc].
Admonition
Asciidoctor
 Asciidoctor is publishing toolchain for the AsciiDoc writing
format.
 Written in Ruby (and transpiled to JavaScript)
(can be used with JRuby in the JVM)
 Open Source (MIT Licence)
Asciidoctor
Multiple Outputs
 PDF
 HTML pages
 Eclipse Help guides
«Why is asciidoctor a
great tool?»
Source code listings
A code snippet in your documentation
== Usage of Mylyn wikitext
With the method `toHtml(String)` in <<lst-wikitext1>> you
can convert a text from Mediawiki Language to HTML.
[[lst-wikitext1, Listing 1]]
[source,java]
----
public static String toHtml(String mediawikiText) {
StringWriter writer = new StringWriter();
MarkupParser parser = new MarkupParser(new MediaWikiLanguage(), n
parser.parse(mediawikiText);
return writer.toString();
}
----
Callout
== Usage of Mylyn wikitext
With the method `toHtml(String)` in <<lst-wikitext1>> you
can convert a text from Mediawiki Language to HTML.
[[lst-wikitext1, Listing 1]]
[source,java]
----
public static String toHtml(String mediawikiText) {
StringWriter writer = new StringWriter();
MarkupParser parser = new MarkupParser(new MediaWikiLanguage(), n
parser.parse(mediawikiText); // <1>
return writer.toString();
}
----
<1> Main call of the Mylyn Wikitext framework
Callout
Callout – Copy paste friendly
 code snippets corresponding to source code under control
− Always up-to-date
− Ease maintenance
Real source code in your documentation
== Usage of Mylyn wikitext
With the method `toHtml(String)` in <<lst-wikitext1>> you
can convert a text from Mediawiki Language to HTML.
[[lst-wikitext1, Listing 1]]
[source,java]
----
include::src/main/java/MediawikiTest.java[tags=method]
----
<1> Main call of the Mylyn Wikitext framework
Real source code in your documentation
public class MediawikiTest {
//tag::method[]
public static String toHtml(String mediawikiText) {
StringWriter writer = new StringWriter();
MarkupParser parser = new MarkupParser(new MediaWikiLanguage(), new H
parser.parse(mediawikiText); // <1>
return writer.toString();
}
//end::method[]
@Test
public void test() {
StringBuilder sb = new StringBuilder();
sb.append("= Heading 1 =n");
sb.append("n");
sb.append("Hello World!n");
sb.append("n");
sb.append("* Loremn");
Single source your documents
«AsciiDoc lets me do
variable substitution and
conditional inclusion»
Wayne Beaton, Eclipse Foundation
https://waynebeaton.wordpress.com/2015/08/10/new-eclipse-project-handbook/
One source, multiple output
Eclipse Fundation
Handbook
LocationTech
Handbook
PolarSys
Handbook
…
Variable substitution
Open source projects at the Eclipse Foundation are required
to make use of certain Eclipse Foundation services:
* All project issues must be tracked in the
{bugzillaUrl}[{forgeName} Bugzilla]instance;
:forgeName: Eclipse
:bugzillaUrl: https://bugs.eclipse.org/bugs
Eclipse Project Handbook
========================
include::chapters/resources.adoc[] eclipse.adoc
resources.adoc
Variable substitution
Open source projects at the Eclipse Foundation are required
to make use of certain Eclipse Foundation services:
* All project issues must be tracked in the
{bugzillaUrl}[{forgeName} Bugzilla]instance;
:forgeName: LocationTech
:bugzillaUrl: https://www.locationtech.org/bugs
LocationTech Project Handbook
=============================
include::chapters/resources.adoc[] locationtech.adoc
resources.adoc
Conditional inclusion
ifeval::["{forgeName}"=="Eclipse"]
_The Eclipse Foundation strongly encourages all projects to
create an
maintain and http://marketplace.eclipse.org[Eclipse
Marketplace]
presence._
endif::[]
Simple Tools (no setup)
Any text editor
 Extension for Chrome: Asciidoctor.js Live Preview
Live preview in Chrome
JavaFX Codeeditors – Tom Schindl
Build
«Generating the
documentation with
Asciidoctor is always a
straightforward
experience»
Julien Ponge, Eclipse Golo project
https://julien.ponge.org/blog/an-experiment-in-maven-to-gradle-migration/
 Ruby, JavaScript, JVM environments
 Integration with a lot of build systems:
− Maven
− Gradle
 Dependencies available in several repositories
− Maven central
− JCenter
− NPM
 You can build on every machine, without a complex setup
Build system
Edit on GitHub
Edit on GitHub
GitHub Editor
GitHub Preview
Eclipse Scout 2015
Thanks
/@j2r2b
/+JeremieBresson
/jmini
jeremie.bresson@bsi-software.com

More Related Content

What's hot

Investigation of testing with ansible
Investigation of testing with ansibleInvestigation of testing with ansible
Investigation of testing with ansible
Dennis Rowe
 
VCCW - Vagrant based WordPress development environment
VCCW - Vagrant based WordPress development environmentVCCW - Vagrant based WordPress development environment
VCCW - Vagrant based WordPress development environment
Takayuki Miyauchi
 

What's hot (20)

Deploy Node.js application in Heroku using Eclipse
Deploy Node.js application in Heroku using EclipseDeploy Node.js application in Heroku using Eclipse
Deploy Node.js application in Heroku using Eclipse
 
Getting root with benign app store apps vsecurityfest
Getting root with benign app store apps vsecurityfestGetting root with benign app store apps vsecurityfest
Getting root with benign app store apps vsecurityfest
 
Xcode: Hidden Potential
Xcode: Hidden PotentialXcode: Hidden Potential
Xcode: Hidden Potential
 
Nodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web ApplicationsNodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web Applications
 
Vagrant plugin development intro
Vagrant plugin development introVagrant plugin development intro
Vagrant plugin development intro
 
Getting root with benign app store apps
Getting root with benign app store appsGetting root with benign app store apps
Getting root with benign app store apps
 
Drone your Ansible
Drone your AnsibleDrone your Ansible
Drone your Ansible
 
Exploiting Directory Permissions on macOS
Exploiting Directory Permissions on macOSExploiting Directory Permissions on macOS
Exploiting Directory Permissions on macOS
 
Nodejs Intro Part One
Nodejs Intro Part OneNodejs Intro Part One
Nodejs Intro Part One
 
Road to Opscon (Pisa '15) - DevOoops
Road to Opscon (Pisa '15) - DevOoopsRoad to Opscon (Pisa '15) - DevOoops
Road to Opscon (Pisa '15) - DevOoops
 
DevOoops (Increase awareness around DevOps infra security) - VoxxedDays Ticin...
DevOoops (Increase awareness around DevOps infra security) - VoxxedDays Ticin...DevOoops (Increase awareness around DevOps infra security) - VoxxedDays Ticin...
DevOoops (Increase awareness around DevOps infra security) - VoxxedDays Ticin...
 
Investigation of testing with ansible
Investigation of testing with ansibleInvestigation of testing with ansible
Investigation of testing with ansible
 
Vagrant to-aws-flow
Vagrant to-aws-flowVagrant to-aws-flow
Vagrant to-aws-flow
 
A Deeper Look at Cargo
A Deeper Look at CargoA Deeper Look at Cargo
A Deeper Look at Cargo
 
VCCW - Vagrant based WordPress development environment
VCCW - Vagrant based WordPress development environmentVCCW - Vagrant based WordPress development environment
VCCW - Vagrant based WordPress development environment
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & Ansible
 
OpenShift: Java EE in the clouds
OpenShift: Java EE in the cloudsOpenShift: Java EE in the clouds
OpenShift: Java EE in the clouds
 
How to convince a malware to avoid us
How to convince a malware to avoid usHow to convince a malware to avoid us
How to convince a malware to avoid us
 
Docker for Developers: Dev, Test, Deploy @ BucksCo Devops at MeetMe HQ
Docker for Developers: Dev, Test, Deploy @ BucksCo Devops at MeetMe HQDocker for Developers: Dev, Test, Deploy @ BucksCo Devops at MeetMe HQ
Docker for Developers: Dev, Test, Deploy @ BucksCo Devops at MeetMe HQ
 
Multiple django applications on a single server with nginx
Multiple django applications on a single server with nginxMultiple django applications on a single server with nginx
Multiple django applications on a single server with nginx
 

Viewers also liked

Marketingpresentation
MarketingpresentationMarketingpresentation
Marketingpresentation
Sara Brown
 
Ap6
Ap6Ap6
Ap6
H L
 
Final Evaluation =[
Final Evaluation =[Final Evaluation =[
Final Evaluation =[
stevenpwells
 
Making Wordpress Blog
Making Wordpress BlogMaking Wordpress Blog
Making Wordpress Blog
chirtoomaung
 
Final Evaluation =[
Final Evaluation =[Final Evaluation =[
Final Evaluation =[
stevenpwells
 
Ict Kwartaal 2 Sjimmie Kort 0804276 Voorstelling
Ict Kwartaal 2   Sjimmie Kort   0804276   VoorstellingIct Kwartaal 2   Sjimmie Kort   0804276   Voorstelling
Ict Kwartaal 2 Sjimmie Kort 0804276 Voorstelling
guest037b219
 

Viewers also liked (20)

Close up on film 1.11
Close up on film 1.11Close up on film 1.11
Close up on film 1.11
 
Marketingpresentation
MarketingpresentationMarketingpresentation
Marketingpresentation
 
Referentiecase ODH | ICreative
Referentiecase ODH | ICreativeReferentiecase ODH | ICreative
Referentiecase ODH | ICreative
 
Synergy Lms Training
Synergy Lms TrainingSynergy Lms Training
Synergy Lms Training
 
Ap6
Ap6Ap6
Ap6
 
Practically Realising Prosperity - John Savage
Practically Realising Prosperity - John SavagePractically Realising Prosperity - John Savage
Practically Realising Prosperity - John Savage
 
Business Info Engl1
Business Info Engl1Business Info Engl1
Business Info Engl1
 
Final Evaluation =[
Final Evaluation =[Final Evaluation =[
Final Evaluation =[
 
Making Wordpress Blog
Making Wordpress BlogMaking Wordpress Blog
Making Wordpress Blog
 
2
22
2
 
Weathering
WeatheringWeathering
Weathering
 
Magazine Research
Magazine ResearchMagazine Research
Magazine Research
 
Radermacher.Addendum 06.09
Radermacher.Addendum 06.09Radermacher.Addendum 06.09
Radermacher.Addendum 06.09
 
Francis trabajo de inglés
Francis trabajo de inglésFrancis trabajo de inglés
Francis trabajo de inglés
 
MA Oil Tank Upgrade Law
MA Oil Tank Upgrade LawMA Oil Tank Upgrade Law
MA Oil Tank Upgrade Law
 
Hooduku - Cloud and Big data practice
Hooduku - Cloud and Big data practiceHooduku - Cloud and Big data practice
Hooduku - Cloud and Big data practice
 
Final Evaluation =[
Final Evaluation =[Final Evaluation =[
Final Evaluation =[
 
Ict Kwartaal 2 Sjimmie Kort 0804276 Voorstelling
Ict Kwartaal 2   Sjimmie Kort   0804276   VoorstellingIct Kwartaal 2   Sjimmie Kort   0804276   Voorstelling
Ict Kwartaal 2 Sjimmie Kort 0804276 Voorstelling
 
Why Use Wordpress
Why Use WordpressWhy Use Wordpress
Why Use Wordpress
 
Social Web 5
Social Web 5Social Web 5
Social Web 5
 

Similar to Writing documentation with Asciidoctor

Assignment 2Assignment Content1. Top of FormResource·.docx
Assignment 2Assignment Content1. Top of FormResource·.docxAssignment 2Assignment Content1. Top of FormResource·.docx
Assignment 2Assignment Content1. Top of FormResource·.docx
braycarissa250
 
Chapter 2.1
Chapter 2.1Chapter 2.1
Chapter 2.1
sotlsoc
 

Similar to Writing documentation with Asciidoctor (20)

Comment Asciidoctor peut vous aider pour votre doc
Comment Asciidoctor peut vous aider pour votre docComment Asciidoctor peut vous aider pour votre doc
Comment Asciidoctor peut vous aider pour votre doc
 
2017-06-22 Documentation as code
2017-06-22 Documentation as code2017-06-22 Documentation as code
2017-06-22 Documentation as code
 
Arquillian in a nutshell
Arquillian in a nutshellArquillian in a nutshell
Arquillian in a nutshell
 
API workshop: Deep dive into Java
API workshop: Deep dive into JavaAPI workshop: Deep dive into Java
API workshop: Deep dive into Java
 
Arquillian in a nutshell
Arquillian in a nutshellArquillian in a nutshell
Arquillian in a nutshell
 
Objective-C for Java Developers, Lesson 1
Objective-C for Java Developers, Lesson 1Objective-C for Java Developers, Lesson 1
Objective-C for Java Developers, Lesson 1
 
Cis 274 intro
Cis 274   introCis 274   intro
Cis 274 intro
 
Assignment 2Assignment Content1. Top of FormResource·.docx
Assignment 2Assignment Content1. Top of FormResource·.docxAssignment 2Assignment Content1. Top of FormResource·.docx
Assignment 2Assignment Content1. Top of FormResource·.docx
 
Chapter 2.1
Chapter 2.1Chapter 2.1
Chapter 2.1
 
Object Oriented Programming - Java
Object Oriented Programming -  JavaObject Oriented Programming -  Java
Object Oriented Programming - Java
 
DevOps Odessa #TechTalks 21.01.2020
DevOps Odessa #TechTalks 21.01.2020DevOps Odessa #TechTalks 21.01.2020
DevOps Odessa #TechTalks 21.01.2020
 
Tomcat + other things
Tomcat + other thingsTomcat + other things
Tomcat + other things
 
Code Documentation. That ugly thing...
Code Documentation. That ugly thing...Code Documentation. That ugly thing...
Code Documentation. That ugly thing...
 
Write code that writes code! A beginner's guide to Annotation Processing - Ja...
Write code that writes code! A beginner's guide to Annotation Processing - Ja...Write code that writes code! A beginner's guide to Annotation Processing - Ja...
Write code that writes code! A beginner's guide to Annotation Processing - Ja...
 
Write code that writes code!
Write code that writes code!Write code that writes code!
Write code that writes code!
 
Pi j4.1 packages
Pi j4.1 packagesPi j4.1 packages
Pi j4.1 packages
 
GradleFX
GradleFXGradleFX
GradleFX
 
Standards For Java Coding
Standards For Java CodingStandards For Java Coding
Standards For Java Coding
 
Introduction to Apache Ant
Introduction to Apache AntIntroduction to Apache Ant
Introduction to Apache Ant
 
Gradle Introduction
Gradle IntroductionGradle Introduction
Gradle Introduction
 

Recently uploaded

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Recently uploaded (20)

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 

Writing documentation with Asciidoctor

  • 1. Jérémie Bresson – 03.11.2015 Writing documentation with Asciidoctor
  • 3. AsciiDoc example = Getting Started with Java Author Name <author@example.org> == Hello World example Copy the *HelloWorld.java* file. TIP: The application prints _Hello World!_ to the console. * Compile this source to a class file using `javac`. * Run the compiled class file using `java`. If you need help with the Java syntax check the link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc].
  • 5. AsciiDoc example = Getting Started with Java Author Name <author@example.org> == Hello World example Copy the *HelloWorld.java* file. TIP: The application prints _Hello World!_ to the console. * Compile this source to a class file using `javac`. * Run the compiled class file using `java`. If you need help with the Java syntax check the link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc].
  • 6. Headings = Getting Started with Java Author Name <author@example.org> == Hello World example Copy the *HelloWorld.java* file. TIP: The application prints _Hello World!_ to the console. * Compile this source to a class file using `javac`. * Run the compiled class file using `java`. If you need help with the Java syntax check the link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc]. Document Title Section Level 1
  • 7. = Getting Started with Java Author Name <author@example.org> == Hello World example Copy the *HelloWorld.java* file. TIP: The application prints _Hello World!_ to the console. * Compile this source to a class file using `javac`. * Run the compiled class file using `java`. If you need help with the Java syntax check the link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc]. Lists Unordered list items
  • 8. Inline formatting = Getting Started with Java Author Name <author@example.org> == Hello World example Copy the *HelloWorld.java* file. TIP: The application prints _Hello World!_ to the console. * Compile this source to a class file using `javac`. * Run the compiled class file using `java`. If you need help with the Java syntax check the link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc]. bold italic code
  • 9. = Getting Started with Java Author Name <author@example.org> == Hello World example Copy the *HelloWorld.java* file. TIP: The application prints _Hello World!_ to the console. * Compile this source to a class file using `javac`. * Run the compiled class file using `java`. If you need help with the Java syntax check the link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc]. Links link with title
  • 10. = Getting Started with Java Author Name <author@example.org> == Hello World example Copy the *HelloWorld.java* file. TIP: The application prints _Hello World!_ to the console. * Compile this source to a class file using `javac`. * Run the compiled class file using `java`. If you need help with the Java syntax check the link:http://docs.oracle.com/javase/8/docs/[Java 8 Javadoc]. Admonition
  • 12.  Asciidoctor is publishing toolchain for the AsciiDoc writing format.  Written in Ruby (and transpiled to JavaScript) (can be used with JRuby in the JVM)  Open Source (MIT Licence) Asciidoctor
  • 13. Multiple Outputs  PDF  HTML pages  Eclipse Help guides
  • 14. «Why is asciidoctor a great tool?»
  • 16. A code snippet in your documentation == Usage of Mylyn wikitext With the method `toHtml(String)` in <<lst-wikitext1>> you can convert a text from Mediawiki Language to HTML. [[lst-wikitext1, Listing 1]] [source,java] ---- public static String toHtml(String mediawikiText) { StringWriter writer = new StringWriter(); MarkupParser parser = new MarkupParser(new MediaWikiLanguage(), n parser.parse(mediawikiText); return writer.toString(); } ----
  • 17. Callout == Usage of Mylyn wikitext With the method `toHtml(String)` in <<lst-wikitext1>> you can convert a text from Mediawiki Language to HTML. [[lst-wikitext1, Listing 1]] [source,java] ---- public static String toHtml(String mediawikiText) { StringWriter writer = new StringWriter(); MarkupParser parser = new MarkupParser(new MediaWikiLanguage(), n parser.parse(mediawikiText); // <1> return writer.toString(); } ---- <1> Main call of the Mylyn Wikitext framework
  • 19. Callout – Copy paste friendly
  • 20.  code snippets corresponding to source code under control − Always up-to-date − Ease maintenance Real source code in your documentation == Usage of Mylyn wikitext With the method `toHtml(String)` in <<lst-wikitext1>> you can convert a text from Mediawiki Language to HTML. [[lst-wikitext1, Listing 1]] [source,java] ---- include::src/main/java/MediawikiTest.java[tags=method] ---- <1> Main call of the Mylyn Wikitext framework
  • 21. Real source code in your documentation public class MediawikiTest { //tag::method[] public static String toHtml(String mediawikiText) { StringWriter writer = new StringWriter(); MarkupParser parser = new MarkupParser(new MediaWikiLanguage(), new H parser.parse(mediawikiText); // <1> return writer.toString(); } //end::method[] @Test public void test() { StringBuilder sb = new StringBuilder(); sb.append("= Heading 1 =n"); sb.append("n"); sb.append("Hello World!n"); sb.append("n"); sb.append("* Loremn");
  • 22. Single source your documents
  • 23. «AsciiDoc lets me do variable substitution and conditional inclusion» Wayne Beaton, Eclipse Foundation https://waynebeaton.wordpress.com/2015/08/10/new-eclipse-project-handbook/
  • 24. One source, multiple output Eclipse Fundation Handbook LocationTech Handbook PolarSys Handbook …
  • 25. Variable substitution Open source projects at the Eclipse Foundation are required to make use of certain Eclipse Foundation services: * All project issues must be tracked in the {bugzillaUrl}[{forgeName} Bugzilla]instance; :forgeName: Eclipse :bugzillaUrl: https://bugs.eclipse.org/bugs Eclipse Project Handbook ======================== include::chapters/resources.adoc[] eclipse.adoc resources.adoc
  • 26. Variable substitution Open source projects at the Eclipse Foundation are required to make use of certain Eclipse Foundation services: * All project issues must be tracked in the {bugzillaUrl}[{forgeName} Bugzilla]instance; :forgeName: LocationTech :bugzillaUrl: https://www.locationtech.org/bugs LocationTech Project Handbook ============================= include::chapters/resources.adoc[] locationtech.adoc resources.adoc
  • 27. Conditional inclusion ifeval::["{forgeName}"=="Eclipse"] _The Eclipse Foundation strongly encourages all projects to create an maintain and http://marketplace.eclipse.org[Eclipse Marketplace] presence._ endif::[]
  • 30.  Extension for Chrome: Asciidoctor.js Live Preview Live preview in Chrome
  • 31. JavaFX Codeeditors – Tom Schindl
  • 32. Build
  • 33. «Generating the documentation with Asciidoctor is always a straightforward experience» Julien Ponge, Eclipse Golo project https://julien.ponge.org/blog/an-experiment-in-maven-to-gradle-migration/
  • 34.  Ruby, JavaScript, JVM environments  Integration with a lot of build systems: − Maven − Gradle  Dependencies available in several repositories − Maven central − JCenter − NPM  You can build on every machine, without a complex setup Build system