JBake is a static site generator, it's inspired from jekyll and written in java. The basic idea is to have templates for the structure of the page, and the body generated from asciidoc content.
- Maven
- JDK8+
Deploying to Github will require password less authentication.
This is done by exporting your SSH public key into your Github account.
The instructions below assume the current directory to be the root of the clone.
git checkout --orphan gh-pages
git rm -rf .
touch empty_file
git add empty_file
git commit -m "add empy_file"
git push origin gh-pages
Now that you created the gh-pages branch, get back to master:
git checkout master
The pom.xml file references the Github repo URL.
Update distributionManagement.site.url to point at your repository.
The site is generated under target/staging.
Open file:///PATH_TO_PROJECT_DIR/target/staging in a browser to view the site.
mvn generate-resources
Or you can invoke the JBake plugin directly.
mvn jbake:build
mvn jbake:watch
If you keep this command running, changes to the sources will be detected and the site will be rendered incrementally.
This is convenient when writing content.
mvn jbake:serve
If a webserver is required (e.g. absolute path are used), this command will start a webserver (jetty) at http://localhost:8820. It can also watch for changes and rebuild incrementally.
mvn deploy