pupupu

simple static CMS for crappy servers
git clone https://git.ce9e.org/pupupu.git

NameSize
.gitignore30B
.htaccess311B
CHANGES.md396B
Makefile568B
README.md3442B
api.php6547B
composer.json127B
extractmessages.sh254B
index.php1993B
package.json191B
static/file.png637B
static/folder.png757B
static/main.js999B
static/main.scss1316B
templates/.htaccess14B
templates/base.html923B
templates/error.html111B
templates/files.html1571B
templates/page.html840B
templates/pages.html674B
templates/site.html408B
templates/users.html762B
themes/.htaccess14B
themes/default/default.html1164B
themes/default/sitemap.xml516B
trans/de.yml760B
utils.php3251B
vendor/.htaccess14B
views.php4097B

pupupu - simple static CMS for crappy servers

Static website generators are awesome because of two reasons:

The big downside is that usability for non-developers is poor because they usually do not know about text editors and git.

Lektor calls itself a "static content management system". It is a static website generator, but it also has a web UI to edit the source files. This way, it feels a lot like a CMS while maintaining most of the benefits of a static website generator.

Unfortunately, many hosters still only offer PHP. So Lektor, which is written in python, is not an option.

So here I present: A simple static CMS for crappy servers!

Quickstart

Documentation

Folder Structure

The following files and folders are relevant for your project:

Content

For each page, there is a corresponding yaml and markdown file in /_content/. The template can be defined in the yaml file using the _template key. If none is specified, default.html is used.

Each time a page is saved in the UI, it automatically regenerated. If the site config is saved, all pages are regenerated. If a page uses the API to include content from other pages, you can add it to _dynamic in the site config to regenerate it each time any page is saved.

Files and Folders

Most pages will be represented as a folder containing the files index.yml and index.md. This will generated a folder containing index.html. Browsers can skip the index.html part, resulting in nice URLs.

Still, there are some cases where you need to control the file name. For this reason, a different pattern is used if the page name contains a dot: If you create a page called "feed.xml", the corresponding files are called feed.xml.yml and feed.xml.md and will generate feed.xml. (Pages that have a dot in their name can consequently not have subpages.)

Templates

Twig is used as templating system. The following variables are available in a template:

There are also some special filters available: