No-Bullshit, very (very, very) minimal CMS
- Write your content in markdown files
- Compile website to static html files
- Done
"pandoc" must be installed on the machine you compile your .md files on. And python should be installed for index generation
There is none. Clone this repo, fill markdown files with content, compile, upload generated HTML files and the CSS style file (default is style.css) to your webroot.
make index
This will auto-generate the index.md
file (while overwrite an existing one)
like this:
% foobar
* [Hello world!](hello-world.md)
* [pagename](20190104_pagename.md)
The list will include all .md
files in the directory, except README.md and,
of course, index.md.
Entries will be sorted reversely, so most recent date timestamp in filename will be first.
For this script to work, it's expected to have a sm-cms.ini
file in the same
directory, with this content:
[general]
IndexFile = index.md
IndexTitle = foobar
ReverseSorting = true
At the moment, only reverse-sorting is supported.
./create-page.sh pagename
This will generate a file named like this:
20190104_pagename.md
With this content:
$ cat 20190104_pagename.md
% pagename
I suggest to add new pages with this script, so you have a proper timestamp in the filename.
make website
This will generate HTML files from all markdown files in the directory, except README.md
Put your data in upload.sh
:
#!/usr/bin/env bash
username="someuser"
hostname="example.domain"
webroot="/var/www/example.domain"
scp *.html style.css "$username"@"$hostname":"$webroot"
And just run it to upload all HTML files and the style.css
file:
$ ./upload.sh
- add some actual error handling in scripts
- think of a way to automatically add a link back to the index in the pages