Apr 22 2009
∞
The next iteration of my low budget CMS idea
- Everything is wrapped in a basic layout.
- Plain text files for pages (“content”) in YAML or XML (YAML for now because XML in PHP sucks).
- Map urls to the content files, so that the url structure reflects the file system.
- Content files have metadata (page title, etc), sprinkled throughout the layout.
- Content files also have arrays (“sections”) of data structures (“components”).
- Components are defined by a type (HTML, Markdown, list, table, image gallery, etc) and are stored as a PHP associative array. They have an edit form and a chunk of JavaScript for handling the form and committing changes back to the content file.
- Some components are “snippets,” which are like subpages that can be included in multiple pages.
- The editing interface is the page itself, only in “edit” mode you see controls for editing and deleting components. Also, there’s a simple interface for adding and deleting pages.
- The power comes from the components, which are highly extensible.
- Everything can be changed by editing the plain text files.
- A layer of cache logic on top shouldn’t be too hard either.