Onacms (aka: "Oh No! Another Content Management System!") is not really a content management system, but a content management engine written in Go (Golang). It is considered to be really fast, for it deliveres all content from memory.
Although Onacms knows about outputing content, minification, and ETags, it heavily relies on a full featured webserver like NGINX or Apache Httpd as a frontend for most other stuff, e.g. Logging, TLS, and GZip.
Onacms makes use of the following three concepts:
- Nodes (aka: pages) (/nodes): this is where your content goes. Content can be plain html or Markdown.
- Templates (/templates): templates take the content from nodes and generate the actual output, e.g. html pages for a website, sitemap.txt, etc. Templates can be written in the builtin Golang html templating engine.
- Static/public files (/public): these files are handled by onacms in the same way that you would expect from any other webserver. Use it e.g. for media files or for static files like robots.txt.
Let's build and run onacms:
Building and dependencies
gb is required to build onacms.
gb build all to build.
We aim for reproducible builds, so all dependencies are part of this repository. The dependencies are:
gb vendor update --all on a regular basis and update this repository accordingly.
bin/main [-dir=<directory>] [-port=<TCP port>] [-logpattern=<pattern>]
directory is the directory containing nodes (/nodes), templates (/templates), and public/static files (/public). The default is /var/opt/onacms
TCP port is the TCP port the daemon listens on. It defaults to 10000.
pattern contains of one or more items from the following list:
- %T - Time (e. g.15:04:05 MST)
- %t - Time (e. g. 15:04)
- %D - Date (e. g 2006/01/02)
- %d - Date (e. g 01/02/06)
- %L - Level (FNST, FINE, DEBG, TRAC, WARN, EROR or CRIT)
- %M - message to be logged
The default is
%D|%T|%L|%M, but if you run onacms using Systemd, there is no need to log time and date
for this is already done by Systemd - in this case
"%L %M" might be a reasonable choice.
Onacms does not log requests from clients! Please use the frontend webserver to have this information logged.