Skip to content

Commit 31b9b68

Browse files
authored
Adding Slides (#1)
Adding slides Adding Hot reload instruction for the slides
1 parent 90c81ae commit 31b9b68

File tree

18 files changed

+319
-24
lines changed

18 files changed

+319
-24
lines changed

.gitignore

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,4 @@
1-
# Compiled class file
2-
*.class
3-
4-
# Log file
5-
*.log
6-
7-
# BlueJ files
8-
*.ctxt
9-
10-
# Mobile Tools for Java (J2ME)
11-
.mtj.tmp/
12-
13-
# Package Files #
14-
*.jar
15-
*.war
16-
*.nar
17-
*.ear
18-
*.zip
19-
*.tar.gz
20-
*.rar
21-
22-
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23-
hs_err_pid*
24-
replay_pid*
1+
#IntelliJ IDEA
2+
.idea/
3+
Gemfile.lock
4+
target/

pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<artifactId>parent</artifactId>
6+
7+
<build>
8+
<defaultGoal>clean package</defaultGoal>
9+
</build>
10+
<groupId>fr.sciam.back-to-front</groupId>
11+
<modelVersion>4.0.0</modelVersion>
12+
13+
<modules>
14+
<module>slides</module>
15+
</modules>
16+
<name>back to front parent</name>
17+
18+
<packaging>pom</packaging>
19+
20+
<version>1.0-SNAPSHOT</version>
21+
</project>

slides/Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'asciidoctor-revealjs'
4+
gem 'asciidoctor-diagram'

slides/README.adoc

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
= Slides for Back to Front talk
2+
3+
This repo contains slides for the talk "Back to Front".
4+
5+
Slides sources are in `src/main/asciidoc` directory, images are in the `src/main/resources/images` directory.
6+
7+
These slides are generated using https://docs.asciidoctor.org/reveal.js-converter/latest/[Asciidoctor for Revealjs].
8+
9+
It generates a Revealjs html file `slides.html` with embedded images in `target/generated-docs` directory.
10+
11+
== Building slides
12+
13+
Slides can be built with Ruby or with java and Maven.
14+
The Ruby generation is more efficient and provides hot generation while Java is here for people that don't want to mess with Ruby (and prefer mess with Java)
15+
16+
=== Ruby
17+
18+
You need a ruby runtime with version 2.3 or more installed.
19+
If you need to install Ruby you can check the https://www.ruby-lang.org/en/documentation/installation/[offcial website]
20+
21+
Then install bundler
22+
23+
24+
`gem install bundler`
25+
26+
27+
And download the dependencies
28+
29+
`bundle update`
30+
31+
and use the local script to render the slides
32+
33+
`./render.sh`
34+
35+
you can also use live render that automatically updates the result when you change source
36+
37+
`./liverender.sh`
38+
39+
generated file will be here:
40+
41+
`target/generated-docs/slides.html`
42+
43+
=== Java And Maven
44+
45+
You need both Java and Maven installed.
46+
47+
just type:
48+
49+
`mvn`
50+
51+
generated file will be in standard maven target:
52+
53+
`target/generated-docs/slides.html`
54+
55+
=== Hot reload
56+
57+
Slides include a livereload script that will automatically reload the browser when you change the source file.
58+
In order to use you need to browse the file through a local webserver like the one include in intellij or other IDE.

slides/liverender.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
tree -fi src/main/asciidoc | grep .adoc | entr ./render.sh

slides/pom.xml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<artifactId>slides</artifactId>
6+
7+
<build>
8+
<defaultGoal>clean package</defaultGoal>
9+
<plugins>
10+
<plugin>
11+
<artifactId>asciidoctor-maven-plugin</artifactId>
12+
<configuration>
13+
<backend>revealjs</backend>
14+
<requires>
15+
<require>asciidoctor-revealjs</require>
16+
<require>asciidoctor-diagram</require>
17+
</requires>
18+
<sourceDirectory>src/main/asciidoc</sourceDirectory>
19+
<sourceDocumentName>slides.adoc</sourceDocumentName>
20+
</configuration>
21+
<dependencies>
22+
<dependency>
23+
<artifactId>asciidoctorj</artifactId>
24+
<groupId>org.asciidoctor</groupId>
25+
<version>${asciidoctorj.version}</version>
26+
</dependency>
27+
<dependency>
28+
<artifactId>asciidoctorj-revealjs</artifactId>
29+
<groupId>org.asciidoctor</groupId>
30+
<version>${asciidoctorj-revealjs.version}</version>
31+
</dependency>
32+
<dependency>
33+
<artifactId>asciidoctorj-diagram</artifactId>
34+
<groupId>org.asciidoctor</groupId>
35+
<version>${asciidoctorj-diagram.version}</version>
36+
</dependency>
37+
</dependencies>
38+
<executions>
39+
<execution>
40+
<goals>
41+
<goal>process-asciidoc</goal>
42+
</goals>
43+
<id>output-html</id>
44+
<phase>generate-resources</phase>
45+
</execution>
46+
</executions>
47+
<groupId>org.asciidoctor</groupId>
48+
<version>${asciidoctor-maven-plugin.version}</version>
49+
</plugin>
50+
</plugins>
51+
</build>
52+
<modelVersion>4.0.0</modelVersion>
53+
<name>slide generator</name>
54+
55+
<packaging>pom</packaging>
56+
<parent>
57+
<artifactId>parent</artifactId>
58+
<groupId>fr.sciam.back-to-front</groupId>
59+
<version>1.0-SNAPSHOT</version>
60+
</parent>
61+
<properties>
62+
<asciidoctor-maven-plugin.version>3.0.0</asciidoctor-maven-plugin.version>
63+
<asciidoctorj-diagram.version>2.3.1</asciidoctorj-diagram.version>
64+
<asciidoctorj-revealjs.version>5.1.0</asciidoctorj-revealjs.version>
65+
<asciidoctorj.version>2.5.13</asciidoctorj.version>
66+
</properties>
67+
68+
<version>1.0-SNAPSHOT</version>
69+
70+
71+
</project>

slides/render.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
bundle exec asciidoctor-revealjs -r asciidoctor-diagram src/main/asciidoc/slides.adoc -o target/generated-docs/slides.html
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
<script type="text/javascript" src="https://livejs.com/live.js"></script>
3+
<style>
4+
.reveal table {
5+
margin: 0em;
6+
border-collapse: collapse;
7+
border-spacing: 0;
8+
border: 0px;
9+
}
10+
</style>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
== HTMX
3+
4+
Hello
5+
6+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
== This is the introduction
3+
4+
Hello
5+
6+

0 commit comments

Comments
 (0)