retrogradeorbit / bootleg

Simple template processing command line tool to help build static websites
Eclipse Public License 2.0
254 stars 12 forks source link

Is bootleg appropriate for a multi-page website? #66

Open practicalli-johnny opened 4 years ago

practicalli-johnny commented 4 years ago

A great project, thank you.

Would bootleg be suitable for generating multi-page websites, such as those I create for the Practicalli series of books, e.g. https://practicalli.github.io/clojure-webapps/

This website is currently generated by GitBook.io using a summary.md file to define the navigation and pages created for the website. The source code is at this repository https://github.com/practicalli/clojure-webapps-content

I get the impression from the documentation that bootleg is more aimed at single page apps, although it could be scripted to do something more involved. Just trying to assess how relevant bootleg would be for generating such websites and the work involved.

I have read the comments on #59 which are very interesting too. Thank you.

borkdude commented 4 years ago

My impression is that bootleg is a low level un-opinionated tool that allows one to build a framework on top of it (multi-page, etc.).

retrogradeorbit commented 4 years ago

Thanks for the question @jr0cket

I certainly use bootleg for generating a multi-page static website: https://github.com/epiccastle/epiccastle.io

I have built fairly large single page apps but they have always included a large server API component, and I have used a full JVM clojure webserver in those instances.

Bootleg was designed because I had a bunch of different parts I had to glue together into my site. The designer's work was plain html, css and jquery. I wanted to do my writing in markdown. I had some metadata that was in yaml. I had some snippets in html templates and other stuff in hiccup. There was no need for any live server side API. I appraised the other static site generators and they all were very much frameworks, with a lot on offer, but also a lot you needed to learn. I would have also had to do a lot of rewriting of my parts to use them. I couldn't find any great converters to fully round-trip hiccup and html. And I didn't want to learn anything new. I felt I just needed some way to convert formats and glue all my parts together. Bootleg grew out of that need.

This is the reason for it being a fast startup single executable. So you can use it to quickly transform some html into hiccup or hickory, select some parts, change some other parts and glue it all back together. That kind of thing.

It's certainly usable in a larger context. I glue it together with a makefile. Now as a babashka pod you can also build something larger that way. Because of its fast startup you can also easily call it from anything else that can run a shell command. For example you could use it to transform hiccup code into html templates intended for another static site generator. It's also possible to use the utilities from full clojure if needed.

If you do build something with it let me know. If you opensource it then I will add it to the examples section for others to see what you have done.