Updated README.
[cmless] / README.md
CommitLineData
9fd57be4 1# Overview #
2670bdf4
AT
2
3CMless is a file based CMS intended for easy integration with version controlled,
4format agnostic content.
5
9fd57be4
AT
6An example site might store each page as a Markdown file, with directories to
7define categories, the entire site using `git` for version and edit-access
8control. CMless can serve that content as a website.
9
10The content for <http://subgeniuskitty.com> can be found in such a
11[repository](git://git.subgeniuskitty.com/website_subgeniuskitty.com).
12
13CMless is kept extremely simple with the intention of being easy to comprehend
14and modify. See the source code for examples demonstrating how to add a new
15piece of functionality.
16
17
18# Status #
19
20Functions as minimal CMS. Runs <http://subgeniuskitty.com>.
21
22Tested on Debian Linux and FreeBSD.
2670bdf4 23
2670bdf4 24
9fd57be4 25# Instructions #
a58599ba 26
9fd57be4 27## Installation - Debian Linux ##
a58599ba
AT
28
29Enable CGI scripts:
30
9fd57be4 31 a2enmod cgid
a58599ba
AT
32
33Create and enable an Apache vhost.
34
ac6fb0d4
AT
35 vi /etc/apache2/sites-available/cmless.subgeniuskitty.com
36
37 <VirtualHost *:80>
9fd57be4 38 DocumentRoot "/srv/apache_vhosts/cmless.subgeniuskitty.com"
ac6fb0d4
AT
39 ServerName cmless.subgeniuskitty.com
40 ServerAdmin webmaster@subgeniuskitty.com
41 ErrorLog /var/log/apache2/error_log.cmless.subgeniuskitty.com
42 CustomLog /var/log/apache2/access_log.cmless.subgeniuskitty.com combined
43 AddHandler cgi-script .py
9fd57be4 44 <Directory "/srv/apache_vhosts/cmless.subgeniuskitty.com">
ac6fb0d4
AT
45 Options -ExecCGI -Indexes
46 AllowOverride None
47 Order allow,deny
48 Allow from all
49 </Directory>
9fd57be4 50 <Directory "/srv/apache_vhosts/cmless.subgeniuskitty.com/bin">
ac6fb0d4
AT
51 Options ExecCGI
52 AllowOverride None
53 Order allow,deny
54 Allow from all
55 </Directory>
56 RewriteEngine On
9fd57be4 57 RewriteRule (.*) /srv/apache_vhosts/cmless.subgeniuskitty.com/site/$1
ac6fb0d4 58 RewriteCond %{REQUEST_FILENAME} !-f
9fd57be4 59 RewriteRule .* /srv/apache_vhosts/cmless.subgeniuskitty.com/bin/cmless.py
ac6fb0d4
AT
60 </VirtualHost>
61
62 a2ensite cmless.subgeniuskitty.com
9fd57be4 63 systemctl reload apache2
a58599ba
AT
64
65Clone the CMless git repository into the Apache vhost directory.
66
ac6fb0d4 67 cd /mnt/data/apache_vhosts
9fd57be4 68 git clone git://git.subgeniuskitty.com/cmless/.git cmless.subgeniuskitty.com
ac6fb0d4 69 chown -R www-data:www-data ./cmless.subgeniuskitty.com
a58599ba 70
9fd57be4 71Clone your content into the `site/` folder. If you wish to use a different
ac6fb0d4
AT
72folder, edit the configuration options in `bin/config.py` accordingly. If this
73is your first CMless site, see the `site_sample/` folder for an example site
74using Markdown.
a58599ba 75
9fd57be4
AT
76 cd /srv/apache_vhosts/cmless.subgeniuskitty.com
77 git clone git://git.subgeniuskitty.com/website_subgeniuskitty.com/.git site
ac6fb0d4 78 chown -R www-data:www-data ./site
5dc44f45
AT
79
80Install an appropriate document processor for your content and set the
ac6fb0d4
AT
81`markup_processor` configuration option in `bin/config.py` accordingly. Your
82markup engine should accept text via `stdin` and output HTML on `stdout`.
5dc44f45 83
ac6fb0d4 84 apt-get install discount
5dc44f45 85
ac6fb0d4 86Edit `bin/config.py` and set all configuration options according to the steps
5dc44f45 87taken during installation. Each option is commented inside the file.