Build beautiful presentations with asciidoctor and reveal.js

Build beautiful presentations with asciidoctor and reveal.js
This was just some code. I did not have to care about alignment

I've been a long time looking for an excuse to really use asciidoctor to build presentations. Now that I have the opportunities, I've been enjoying it like a child. For my memory, and for yoy, if you want to use it, here are my tips.

This helps me write in source code (asciidoc), version it, and export it to html presentations with animations, icons, style and glamour (code appearing from nowere and auto highlighter ). And all of this without having to care about alignment!!

I'm using the version 5.0.0-rc.1 of asciidoctor-reveal.js converter. 
WARNING: I've been having issues to print to PDF correctly. I've only managed it with microsoft edge, though most of people was successful with chrome. Just be careful and test it if you need to export to PDF

Main file & Styling

= My great slide
:author: Yourname here
:icons: font
:imagesdir: images/
// reveal.js config
:revealjsdir: reveal.js
:customcss: css/reveal-override.css
:revealjs_theme: white
:revealjs_hash: true
:revealjs_width: 1408
:revealjs_height: 792
:revealjs_slideNumber: true
:revealjs_pdfSeparateFragments: false
:revealjs_controlsBackArrows: faded
// Highliter
:source-highlighter: highlightjs
:highlightjs-languages: asciidoc, python, yaml
//:highlightjs-theme: a11y-dark.css
:docinfo: private
// Title
:title-slide-background-image: myTitleBackground.png

// Separate sections in different files for better organization



icon:note[set=fas]  // solid
icon:address-book[set=far]  // regular
icon:firefox[set=fab]  // brand

// Change size

// With color (make sure this calss is in the CSS)
Icons via flaticon

Layouts (columns)

=== Easy Grid Layout

* Easy

* Flexible

Grid Layout

A column with fixed width
Dynamic columns and fixed ones
=== Data-Intensive patterns




_(search index)_

_(stream processing)_


_(batch processing)_
Vertically centered columns

Slide extras

=== This will not appear
Text that will appear. 
For next slide: let's take a brief look at how it evolved over time. 
Note block. Click s to show them
== Agenda

== Intro infra
// This will contain a white rectangle for text readablilty
image::infrastructure.jpg[background, size=cover]
Background images options
Let's go to the left!

Right in the middle

Now to the right!
Text alignment

Steps (appearing)

=== Today's Agenda

* Introduction
* Introduction to Infrastructure
* Pause 15 min
=== Course Agenda

* [.step.highlight-red]#Introduction to Big Data#
main        proc near
var_10      = dword ptr -10h
            push ebp
            mov ebp, esp
            and esp, 0FFFFFFF0h
            sub esp, 10h
            mov eax, offset aHelloWorld
            mov [esp+10h+var_10], eax
            call _printf
            mov eax, 0
main        endp
Step-by-step line highlights

Important text

=== Questions?
Architecture is about the important stuff... whatever that is.
Lorem [.highlight-strong.step]#ipsum#
Add highlighter to your slides to grab attention

Code animation and highlight

=== Solution
from flask import Flask

app = Flask(__name__)

=== Solution
from flask import Flask

app = Flask(__name__)

def main_page():
    return "<p>Hello, World!</p>"

=== Solution
from flask import Flask
import sqlite3

DB_FILE = "my_app.db"

app = Flask(__name__)

def main_page():
    return "<p>Hello, World!</p>"

Use highlight="1|4..6|8,10"  to highlight 1 in the first step, lines 4 to 6 in the second and 8 and 10 in the last one.

Use data-id=XYZ to link blocks between slides