Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

JBake on JUGChennai


Published on

JBake presentation on JUG Chennai java submit '13

Published in: Technology
  • Login to see the comments

  • Be the first to like this

JBake on JUGChennai

  1. 1. Kaleeswaran @kaleeswaran14
  2. 2. JBake Bake your web site with JBake
  3. 3. What is static site generator?
  4. 4. Static site generator ... Blog or Site generation Coding HTML pages with duplicated markup Too cumbersome Approaching with language (Ruby on Rails/ PHP) Learn the language Store content in a database
  5. 5. Static site generator ... Is a program, that generates an HTML website Separates out the layout, content and styles
  6. 6. Advantages of a Static Site Generator? No database layer Less memory - to serve your website Copy of your content Easily choose website hosting Website Hosting is cheaper
  7. 7. Disadvantages of a Static Site Generator? Static site generator software needed Can’t have local comments Contact us forms (without some dynamic code etc)
  8. 8. Existing Static site generators? Jekyll awestruct staticmatic Webby ……..
  9. 9. Selection Criteria? Don’t force to learn languages easy to understand layouts example websites to learn from server that provides me a development environment Good documentation
  10. 10. Jbake!!!
  11. 11. What is baking?
  12. 12. Building a static web site from just plain old text files... ... an alternative to frying a web site using a database.
  13. 13. Why bake?      Performance Platform independence Content can be version controlled More importantly... improve the life span of content URLs!
  14. 14. Introducing Jbake Open source Java (JVM goodness!) Content structure freedom Supported content formats... Raw HTML Markdown AsciiDoc ...more to come!
  15. 15. Flexible and configurable Template scripting support Blog aware Draft publishing support Use any front end framework... Bootstrap Foundation
  16. 16. What the oven looks like... |-- assets | |-- favicon.gif | |-- robots.txt | |-- css | |-- style.css |-- content | |-- about.html | |-- 2013 | |-- 02 | |-- weekly-links-1.html | |-- |-- templates | |-- index.ftl | |-- page.ftl | |-- post.ftl | |-- feed.ftl |--
  17. 17. JBake Properties template.folder=templates content.folder=content asset.folder=assets render.index=true index.file=index.html render.feed=true feed.file=feed.xml render.archive=false archive.file=archive.html render.tags=false 
  18. 18. Baking Content will be "mixed" with the templates. Folder structure will be maintained
  19. 19. Content file Status & Type fields, the rest are optional
  20. 20. Page Types type=post will use post.ftl type=page will use page.ftl status=published status=draft
  21. 21. Data Variables This data is available to all templates regardless. ${version} = version of JBake ${posts} = collection of all posts (files that don’t have type=page) ${pages} = collection of all pages (files that have type=page) ${config.[options]} = map of configuration data
  22. 22. Data Variables Expandable Header Include extra meta data in the header - exposed to the templates: summary=This is a summary of the larger post And access it from the template like so: <p>${content.summary}</p>
  23. 23. Commands jbake -h (Help) jbake -i (Intialize) jbake (Baking) jbake -s (View)
  24. 24. Roadmap Plugin support (JBake 3.0) Disqus (Facebook, G+ comments) FTP upload Sitemap Tag cloud Github commit for gitpages Paging for posts ...........!
  25. 25. Now for the Demo...
  26. 26. Jbake Plugins support Implementation...
  27. 27.