Skip to content

jruzzi/javaee-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A JBake project for the Java EE tutorial

About JBake

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.

Pre requisites

  • Maven
  • JDK8+

Deploying to Github will require password less authentication.

This is done by exporting your SSH public key into your Github account.

Create an empty gh-pages branch

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

Update site.url in pom.xml

The pom.xml file references the Github repo URL.

Update distributionManagement.site.url to point at your repository.

Build the site locally

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

Rebuild the site on changes

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.

Serve the site locally

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.

Deploy the site to Github Pages

mvn deploy

Links

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published