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