Skip to content

Commit 613199c

Browse files
committed
add current version to docs
1 parent 8a8ce13 commit 613199c

File tree

3 files changed

+35
-24
lines changed

3 files changed

+35
-24
lines changed

docs/asciidoc/getting-started.adoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,26 @@ The default package in all these examples is set to `app`, to get fully control
132132
----
133133
jooby> create myapp -i
134134
----
135+
136+
=== Code Snippets
137+
138+
For simplicity and brevity we are going to skip the `runApp` function and extending `Jooby`.
139+
A code example will looks like:
140+
141+
.Snippet
142+
[source, java, role = "primary"]
143+
----
144+
{
145+
get("/", ctx -> "Snippet");
146+
}
147+
----
148+
149+
.Kotlin
150+
[source, kotlin, role = "secondary"]
151+
----
152+
{
153+
get("/") { "Snippet" }
154+
}
155+
----
156+
157+
The use of `application class` or `runApp function` will be included when is strictly necessary.

docs/asciidoc/index.adoc

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ Style guidelines:
1717
////
1818

1919
= Welcome to Jooby!
20+
Jooby Project <[email protected]>
21+
{joobyVersion}
2022

2123
[discrete]
22-
== &infin; do more, more easily
24+
== &infin; do more, more easily
2325

2426
== Introduction
2527

@@ -28,7 +30,9 @@ favorite web server.
2830

2931
[TIP]
3032
====
31-
Looking for previous version? The link:v1[v1 documentation] is still available.
33+
Latest Release: https://github.com/jooby-project/jooby/releases/tag/{joobyVersion}[{joobyVersion}].
34+
35+
Looking for previous version? The link:v1[1.x] documentation is still available.
3236
====
3337

3438
.Welcome!!
@@ -60,6 +64,8 @@ fun main(args: Array<String>) {
6064
}
6165
----
6266

67+
Source code is available at https://github.com/jooby-project/jooby[GitHub]
68+
6369
=== Features
6470

6571
* Java and Kotlin API
@@ -206,28 +212,6 @@ fun main(args: Array<String>) {
206212

207213
More about MVC and JAX-RS support in the <<mvc-api, MVC API>> chapter.
208214

209-
=== Code Snippets
210-
211-
For simplicity and brevity we are going to skip the `runApp` function and extending `Jooby`.
212-
A code example will looks like:
213-
214-
.Snippet
215-
[source, java, role = "primary"]
216-
----
217-
{
218-
get("/", ctx -> "Snippet");
219-
}
220-
----
221-
222-
.Kotlin
223-
[source, kotlin, role = "secondary"]
224-
----
225-
{
226-
get("/") { "Snippet" }
227-
}
228-
----
229-
230-
The use of `application class` or `runApp function` will be included when is strictly necessary.
231215

232216
include::getting-started.adoc[]
233217

docs/src/main/java/io/jooby/adoc/DocGenerator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
import java.nio.file.Path;
3030
import java.nio.file.Paths;
3131
import java.nio.file.StandardCopyOption;
32+
import java.time.Instant;
33+
import java.time.LocalDateTime;
34+
import java.time.format.DateTimeFormatter;
3235
import java.util.Arrays;
3336
import java.util.Collection;
3437
import java.util.HashSet;
@@ -207,6 +210,7 @@ private static Options createOptions(Path basedir, Path outdir, String version,
207210
.forEach(tag -> attributes.setAttribute(toJavaName(tag.tagName()), tag.text().trim()));
208211

209212
attributes.setAttribute("joobyVersion", version);
213+
attributes.setAttribute("date", DateTimeFormatter.ISO_INSTANT.format(Instant.now()));
210214

211215
Options options = new Options();
212216
options.setBackend("html");

0 commit comments

Comments
 (0)