Now that I can write posts in HTML and in Markdown what is missing to create the smallest static web generator we can imagine?
In fact this is only the first list of missing features, for example Octopress has a beautiful syntax highlight, anyway... I asked to myself the minimum to be able to publish and organize content and let people follows my blog, so:
This will require for sure to order posts with respect to their date to publish only some of last published ones. To do this I will collect posts metadata during posts processing. As you can imagine this will be used also when we will implement the tags pages. The bootstrap construct used is the description lists. I already had an index template I modified it and added a new composite attribute to the StringTemplate instance used.
While processing posts I collect data about posts into a ArrayList
used by Blog.createTagsPages()
. A main page with all tags together with a page for each tag get created by the above method.
Atom feed is created from the same data used for the main index page. When I searched for a library to generate an atom
file from Java the surprise was that there are not so much alternatives. Finally I have chosen ROME to do not chose the Apache alternative Abdera that seemed to me to have more dependencies. The documentation is not that big nevertheless I found the example I was looking for.
At this point I also added Font Awesome to add the feed symbol on the navigation bar.
As a final note I have chosen to implement Atom instead of RSS because it's a newer format.