Skip to content
/ rpub Public

A free open-source CMS written in Clojure.

License

Notifications You must be signed in to change notification settings

rpub-clj/rpub

Repository files navigation

rPub

stability-alpha Docker Clojars Slack

A free open-source CMS written in Clojure.

Table of Contents

FeaturesQuick StartAPIPluginsContributingCreditsLicense

Features

See the rPub announcement post for more details.

  • Designed to be easy to set up and use with no coding required
  • Includes an admin UI to manage content and settings
  • Supports custom fields to allow for all types of content
  • Supports browsing and installing plugins from the admin UI
  • Supports themes and customizing appearance from the admin UI
  • Supports developing plugins and themes interactively using the REPL
  • Uses SQLite by default with protocols to support alternative storage backends
  • MIT license allows the code to be modified for both commercial and non-commercial use

Quick Start

App (With Docker)

Requirements: DockerDocker Compose

mkdir rpub && cd rpub
curl -O https://raw.githubusercontent.com/rpub-clj/rpub/refs/tags/v0.1.0/docker-compose.yaml
docker compose up -d

App (Without Docker)

Requirements: GitJavaClojureBabashka

mkdir rpub && cd rpub
bb -Sdeps '{:deps {dev.rpub/rpub {:mvn/version "0.1.0"}}}' -m rpub.tasks/supervisor --mvn/version 0.1.0

Library

Requirements: GitJavaClojure • Auto-Restarts

Note: To load changes to the classpath outside of the REPL, rPub stops the JVM and expects it to be auto-restarted. To implement auto-restarts you can either a) use a wrapper (see rpub.tasks/supervisor) or b) configure an existing supervisor to do this (e.g. Docker or systemd).

;; deps.edn
{:paths ["src"]
 :deps {dev.rpub/rpub {:mvn/version "0.1.0"}}}

;; src/com/example.clj
(ns com.example
  (:require [rpub.core :as rpub])

(defn -main [& _]
  (rpub/start!))
clojure -M -m com.example

API

See the API.md file for all public functions.

Note: Any functions not listed in this file should be considered implementation details and subject to change.

Plugins

See the rpub-clj/plugins repository for a list of all available plugins.

Plugins can be added by extending the rpub.core/plugin multimethod:

;; data/example-plugin/deps.edn
{:paths ["src"]
 :deps {}
 :aliases {:dev {:extra-deps {dev.rpub/rpub {:mvn/version "0.1.0"}}}}}

;; data/example-plugin/src/com/example/plugin.clj
(ns com.example.plugin
  (:require [rpub.core :as rpub]))

(defn init [opts])

(defn middleware [opts])

(defn routes [opts])

(defmethod rpub/plugin ::plugin [_]
  {:label "Hello"
   :description "An example plugin."
   :init init
   :middleware middleware
   :routes routes})

To use the plugin, require the namespace before you start rPub. If you install a plugin through the admin UI, it will do this for you automatically:

;; data/deps.edn
{:deps {dev.rpub/rpub {:mvn/version "0.1.0"}
        com.example/plugin {:local/root "example-plugin"}}}

;; data/app.clj
(ns app
  (:require [rpub.main :as main]
            [com.example.plugin]))

(defn -main [& _]
  (main/start!))

Contributing

If you'd like to contribute to rPub, you're welcome to create issues for ideas, feature requests, and bug reports.

Credits

See the CREDITS.md file.

License

Copyright © 2025 Radford Smith

rPub is distributed under the MIT License.

Contributors 3

  •  
  •  
  •  

Languages