blob: a3ec2b697b96e12c0c392b93c06f81b587c1ded1 [file] [log] [blame] [view]
Vinay Vishal7c4c4fc2019-01-28 12:01:04 +05301# A JBake project template
2
3## About JBake
4
5JBake is a static site generator, it's inspired from jekyll and written
6in java. The basic idea is to have templates for the structure of the
7page, and the body generated from asciidoc content.
8
9## Pre requisites
10
11- Maven
12- JDK8+
13
14Deploying to Github will require password less authentication.
15
16This is done by exporting your SSH public key into your Github account.
17
18## Build the site locally
19
20The site is generated under target/staging.
21
22Open file:///PATH_TO_PROJECT_DIR/target/staging in a browser to view the site.
23
24```
25mvn generate-resources
26```
27
28Or you can invoke the JBake plugin directly.
29
30```
31mvn jbake:build
32```
33
34### Rebuild the site on changes
35
36```
37mvn jbake:watch
38```
39
40If you keep this command running, changes to the sources will be
41detected and the site will be rendered incrementally.
42
43This is convenient when writing content.
44
45### Serve the site locally
46
47```
48mvn jbake:serve
49```
50
51If a webserver is required (e.g. absolute path are used), this command
52will start a webserver (jetty) at http://localhost:8820. It will also
53watch for changes and rebuild incrementally.
54
55## Deploy the site to Github Pages
56
57```
58mvn deploy
59```
60
61## Produce a zip file for download
62
63To produce a zip file containing the generated html files, use:
64
65```
66mvn package
67```
68
69When making a release on GitHub, this zip file should be added to the release.
70
71## Links
72
73- [JBake maven plugin documentation](https://github.com/Blazebit/jbake-maven-plugin)
74- [JBake documentation](http://jbake.org/docs/2.5.1)
75- [Freemarker documentation](http://freemarker.org/docs)
76- [AsciiDoc User Guide](http://asciidoc.org/userguide.html)
77- [Asciidoctor quick reference](http://asciidoctor.org/docs/asciidoc-syntax-quick-reference)