Hugo is a nice static web site generator, suitable for blogs and much more. I use trello as a backend for drafting, organizing and publishing content via hugo. It works wonders.
hugo is written in golang. It is fast (when compared to
jekyll for instance), it is simple and well, the website is here to tell you more about it.
hugo typical use case is:
- for blogs,
- where posts are written on the blogger’s local machine,
- in markdown,
- using the blogger’s personal favourite editor,
- version controlled by git,
- the build being hosted on github pages.
I wrote something about this workflow a while ago.
hugo is however not limited to this very convenient and quite hacky workflow. Its features are quite extensive, from menus, sitemaps, shortcodes and such allows for a lot of use cases and with some creativity, even “quite dynamic” websites.
trello is more difficult to describe. It is said to be a “great tool to organize your life”. 10m users and rocking.
trello provides their users “boards” that contain “lists” (columns) that contain “cards”. The user experience is great whether it be the browser and mobile apps or the REST API, with its collaborative, “near real time” and open features.
Considering how great trello is to organize professional development project in a agile/kanban way, ease recruitment process, follow commercial leads, I have grown interested in using it as a website backend, not to say a “content management system”:
- “Cards” are the atomic content, with id, name, markdown description, attachments, checklists, due date, members, votes and labels. Pretty much what’s needed for a “post”.
- “Lists” are “cards” containers, with a id, name and a sorted collection of “cards”. Pretty much what’s needed for a “group” or a “status”.
- “Boards” are a “list containers” with a name, members and various parameters that makes them a good fit for a “web site”.
trello to hugo
trello2hugo is implemented as a daemon:
- sitting right next to the hugo website,
- listening to webhook pings from a trello board,
- generating the whole website using hugo,
- implemented in go.
For now, my workflow is pretty convoluted:
- set up a hugo site and a
trello2hugoinstance on a server (requires a trello board id)
- create a trello board per web site,
- then create “_” prefixed lists, such as “_ideas”, “_drafts” or “_tobevalidated”, whose content will not be published
- and normal lists, such as “posts”, “tips”, “pages” whose content will be published
- then create card in the desired list, adding content, attachments and such
- then eventually move it to another list, possibly publishable
trello2hugothen receives trello’s webhook POST, fetches content and regenerate the website.