practicalli / practicalli/clojure

Static websites in Clojure

Open
#218 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

babashka long-term-project static-site-generator
Dominant language
Makefile
Stars
117
Forks
36
PR merge metrics
No merged PRs in 30d

Description

Clojure tools for generating static websites, such as blogs but also multi-page workhops, tutorials and books such as Practicalli Clojure.

Review available projects in Clojure
Do any projects meet the requirements, especially as a replacement for GitBook which is used to generate the Practicalli series of books.

Requirements:

  • simple way to define navigation, perhaps edn (bonus: using or reading in summary.md files)
  • high quality code syntax highlighting (as good as a Clojure editor)
  • live code option (e.g. klipse but with a choice between Clojure and ClojureScript backend so that examples are not limited by the host environment, something more responsive than repl.it)
  • placeholders and template support
  • stylised layout, grid or flex support for multiple components
  • responsive design, works across devices with no special customization for each type of device

Useful articles
https://www.mxmmz.nl/blog/building-a-website-with-babashka.html
https://cjohansen.no/building-static-sites-in-clojure-with-stasis/
https://hackeryarn.com/post/why-i-built-a-static-site-in-clojure/
https://juxt.pro/blog/babashka
https://github.com/theiceshelf/firn
https://firn.theiceshelf.com/getting-started
https://www.reddit.com/r/Clojure/comments/hp6swk/firn_a_static_site_generator_for_org_mode_in/
Promising although org mode files rather than .md files (would be good for new books, need some converting for existing books.

https://cryogenweb.org/ (currently used for Practicalli blog website)
https://github.com/hashobject/perun
https://nakkaya.com/static.html
https://cjohansen.no/building-static-sites-in-clojure-with-stasis
https://github.com/magnars/stasis
https://groups.google.com/d/msg/clojure/orjvY1N_HSA/tNBAMHrQBgAJ
http://nickgeorge.net/programming/building-my-static-clojure-website/

Data science stuff
https://www.reddit.com/r/Clojure/comments/bwnrfi/oz_static_site_generation_with_live_code_reloading/

Using Babashka

https://cljdoc.org/d/borkdude/babashka
Using a script is a feasible and possibly lightweight approach to generating static websites. Babashka has recently added a webserver, so might also be used to spin up a local live preview of the site with live reload on changes

Example of babashka as a script
https://www.mxmmz.nl/blog/building-a-website-with-babashka.html
https://github.com/retrogradeorbit/bootleg - a command line tool for generating static sites. Can this be used as a library too?

Going beyond a static site generator

Given a fixed set of options, generate a custom version of that content. For example, specifying operating system would show only those parts relevant to the specific OS. Specifying which Clojure tool or editor would show content specific to that and remove irrelevant content.

Discussions
https://www.reddit.com/r/Clojure/comments/9g68n4/here_is_why_i_built_a_static_site_in_clojure/

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the listed Clojure static-site projects, especially Cryogen, Firn, Stasis, Perun and Bootleg, alongside the current GitBook use for the Practicalli books. Compare them against the navigation, highlighting, live-code, templating, layout and responsive-design requirements. Done means documenting a clear project choice or implementation plan, including any migration needed from existing Markdown content.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
content, documentation, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.