Skip to content

Commit c0636c0

Browse files
committed
Update required versions and how it all works
1 parent 2d9f2fb commit c0636c0

File tree

1 file changed

+36
-37
lines changed

1 file changed

+36
-37
lines changed

README.md

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
Thymeleaf Docs
23
==============
34

@@ -13,31 +14,32 @@ examined here: https://pandoc.org/MANUAL.html#pandocs-markdown
1314
Types of documents managed
1415
--------------------------
1516

16-
* Tutorials, living in `docs/tutorials`. Output: HTML, PDF, EPUB and Kindle. Given their length,
17-
tutorials use their own HTML style, with an index frame on the left side.
18-
* Articles, living in `docs/articles`. Output: HTML only. Articles are output with the same
19-
HTML style as the rest of the Thymeleaf web site.
17+
* Tutorials, living in `docs/tutorials`. Output: HTML, PDF, EPUB and Kindle.
18+
Given their length, tutorials use their own HTML style, with an index frame
19+
on the left side.
20+
* Articles, living in `docs/articles`. Output: HTML only. Articles are output
21+
with the same HTML style as the rest of the Thymeleaf web site.
2022

2123

2224
Setup
2325
-----
2426

25-
(I'm going to assume you've got a working Java 6+ environment.)
26-
27-
1. Download and install **Gradle**: http://www.gradle.org/downloads
28-
2. Download and install **Pandoc** for your environment: http://johnmacfarlane.net/pandoc/installing.html
29-
(PDF output is not done using Pandoc, so you don't need to get LaTeX.). You will need version 1.12 or
30-
newer of pandoc, as it fixes some important bugs.
31-
3. Download and install **wkhtmltopdf** for your environment: http://wkhtmltopdf.org/downloads.html.
32-
wkhtmltopdf is used for rendering PDF files from pandoc's HTML output, so you might not need it if you
33-
are not interested on PDF output.
34-
4. Download and install **Calibre** for your environment: http://calibre-ebook.com/download. Calibre is used
35-
for conversion of pandoc's `.epub` output (e-book) into `.mobi` files (Kindle format), so you might not need it if you
36-
are not interested on e-book output.
37-
38-
Optional: If you want to be able to import this project into Eclipse or run the
39-
Gradle job from Eclipse, then install the Groovy-Eclipse and Gradle IDE
27+
Java 8+ required. The build process is often run on machines with Java 11.
28+
29+
1. Download and install **Gradle**: http://www.gradle.org/install
30+
2. Download and install **Pandoc**: http://johnmacfarlane.net/pandoc/installing.html
31+
(PDF output is not done using Pandoc, so you don't need to get LaTeX.). You
32+
will need version 2.2.1 or newer.
33+
3. Optional: download and install **wkhtmltopdf**: http://wkhtmltopdf.org/downloads.html.
34+
wkhtmltopdf is used for rendering PDF files from pandoc's HTML output.
35+
4. Optional: download and install **Calibre**: http://calibre-ebook.com/download.
36+
Calibre is used for conversion of pandoc's `.epub` output (e-book) into
37+
`.mobi` files (Kindle format).
38+
39+
Additionally, if you want to be able to import this project into Eclipse or run
40+
the Gradle tasks from Eclipse, then install the Groovy-Eclipse and Gradle IDE
4041
components from the [Spring Tool Suite](http://www.springsource.org/sts).
42+
IntelliJ IDEA has support for Gradle tasks through its built-in Gradle plugin.
4143

4244

4345
Generating the documentation
@@ -52,36 +54,33 @@ sources to HTML, e-books and PDF. The following Gradle tasks perform these jobs:
5254
* `generateDocsEbook` - Create the e-books.
5355
* `generateDocs` - Creates all docs
5456

55-
The generated docs will end up in the `build/site/doc` directory. The entire `build/site`
56-
directory will be prepared for direct copy (`cp -R`) to the Thymeleaf website repository
57-
(`thymeleaf.github.com`) for publishing, and it will also contain several `.html` files
58-
in the `build/site` and `build/site/doc/html` directories acting as *redirects* from old
59-
locations of documentation files to the new ones (GitHub pages does not support any other kind
60-
of redirects).
57+
The generated docs will end up in the `build/site/doc` directory. The entire
58+
`build/site` directory will be prepared for direct copy (`cp -R`) to the
59+
Thymeleaf website repository (`thymeleaf.github.com`) for publishing.
6160

6261
### Updating the docs for a new version
6362

6463
To change the version number that appears in the generated docs, update the
65-
`project.version` property in the `build.gradle` script. The `project.documentDate`
66-
property should also be changed to reflect the new date the generated documents should
64+
`project.version` property in the `build.gradle` script. The `documentDate` var
65+
should also be changed to reflect the new date the generated documents should
6766
refer to.
6867

6968

7069
How the docs are generated
7170
--------------------------
7271

73-
**Pandoc** is used to convert the Markdown sources into HTML, using the appropriate
74-
HTML template in the `templates` directory, which in turn also makes use of JavaScript and CSS
75-
files copied from the `scripts` and `styles` directories.
72+
**Pandoc** is used to convert the Markdown sources into HTML, using the
73+
appropriate HTML template in the `templates` directory, which in turn make use
74+
of JavaScript and CSS files copied from the `scripts` and `styles` directories.
7675

7776
**Pandoc** is also used to generate e-books in EPUB format.
7877

7978
**Calibre** is used to convert e-books to MOBI (Kindle) format.
8079

81-
**wkhtmltopdf** is used to then create PDF versions of the HTML docs based on the
82-
`media="print"` stylesheet instead of the `media="screen"` one you normally see when opening it in
83-
your browser. This task performs a workaround of launching a **Jetty** server to
84-
temporarily host the HTML files since wkhtmltopdf uses **WebKit** and not using a server would prevent many of the JavaScript files in the HTML documentation from running due
85-
to WebKit's same-origin policies being stricter with the `file://` protocol.
86-
87-
80+
**wkhtmltopdf** is used to create PDF versions of the HTML docs based on the
81+
`media="print"` stylesheet instead of the `media="screen"` one you normally see
82+
when opening it in your browser. The PDF generation task also launches a
83+
**Jetty** server to host the HTML files since wkhtmltopdf uses **WebKit** and
84+
not using a server would prevent many of the JavaScript files in the HTML
85+
documentation from running due to WebKit's same-origin policies being stricter
86+
with the `file://` protocol.

0 commit comments

Comments
 (0)