JBake on JUGChennai
-
Upload
kaleeswaran-s -
Category
Technology
-
view
434 -
download
1
description
Transcript of JBake on JUGChennai
Kaleeswaran@kaleeswaran14
http://jugchennai.in
Bake your web site with JBake
JBake
What is static site generator?
Static site generator ...
Blog or Site generationCoding HTML pages with duplicated markupToo cumbersome
Approaching with language (Ruby on Rails/ PHP)Learn the languageStore content in a database
Static site generator ...
Is a program, that generates an HTML websiteSeparates out the layout, content and styles
Advantages of a Static Site Generator?
No database layerLess memory - to serve your websiteCopy of your contentEasily choose website hostingWebsite Hosting is cheaper
Disadvantages of a Static Site Generator?
Static site generator software neededCan’t have local commentsContact us forms (without some dynamic code etc)
Existing Static site generators?
JekyllawestructstaticmaticWebby……..
Selection Criteria?
Don’t force to learn languageseasy to understand layoutsexample websites to learn fromserver that provides me a development environmentGood documentation
Jbake!!!
What is baking?
Building a static web site from just plain old text files...
... an alternative to frying a web site using a database.
Why bake?
Performance Platform independence Content can be version controlled More importantly... ...help improve the life span of content URLs!
Introducing Jbake
Open sourceJava (JVM goodness!)Content structure freedomSupported content formats...Raw HTMLMarkdownAsciiDoc...more to come!
Flexible and configurableTemplate scripting supportBlog awareDraft publishing supportUse any front end framework... BootstrapFoundation
What the oven looks like...
|-- assets| |-- favicon.gif| |-- robots.txt| |-- css| |-- style.css|-- content| |-- about.html| |-- 2013| |-- 02 | |-- weekly-links-1.html| |-- weekly-links-2.md|-- templates| |-- index.ftl| |-- page.ftl| |-- post.ftl| |-- feed.ftl|-- jbake.properties
JBake Properties
template.folder=templatescontent.folder=contentasset.folder=assetsrender.index=trueindex.file=index.htmlrender.feed=truefeed.file=feed.xmlrender.archive=falsearchive.file=archive.htmlrender.tags=falsesite.host=http://jbake.org
Baking
Content will be "mixed" with the templates.Folder structure will be maintained
Content file
Status & Type fields, the rest are optional
Page Types
type=post will use post.ftltype=page will use page.ftl
status=publishedstatus=draft
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
Data Variables
Expandable HeaderInclude 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>
Commands
jbake -h (Help)jbake -i (Intialize)jbake (Baking)jbake -s (View)
Roadmap
Plugin support (JBake 3.0)Disqus (Facebook, G+ comments)FTP uploadSitemapTag cloudGithub commit for gitpagesPaging for posts...........!
Now for the Demo...
Jbake Plugins support Implementation...
http://jbake.org
http://jugchennai.in