A simple and flexible flat file system for the tinkerers out there.
Author: @brandtleymcminn
Last Updated: August 5, 2013
- To get started, copy the directory into the root system directory of your Localhost.
- Open a terminal program and navigate to your projects directory
- Run
composer install
on the directory and wait for composer to finish installing system dependencies
Have fun :)
And welcome to Throwdown! A powerful and flexible flat file CMS developed using PHP and consumes nothing but good ole' wholesome JSON and Markdown!
Now I know what you're thinking, this just sounds like another PHP library with a predisposition for voilence, but it really is more than that.
I've worked with the best of them. WordPress, Drupal, Blogger... but they all have one thing in common. They try too hard, thus I'm working too hard to make these systems do what I want within a sandboxed context using someone else' API(s). I needed a system that worked as I expected it to, that was efficient to get started with and easy to update as needed. So I wrote Throwdown and tailored it to my exacting specifications, because my clients don't need today's "modern CMS", they need a website that's built on a future focused platform.
But I won't get ahead of myself here...
I'm not satisfied with everything about this system yet. I have a whole slew of AWESOME features in mind that I think will be absolutely killer when implemented properly, but for now I'll just glaze over some of the highlights so far:
- The system is configured via the
config.json
file located in the root directory.{ "default_template": "default.php" // fallback template in the event a pages defined template does not exist , "default_homepage": "home" // specify a different homepage, other than the default.md page , "current_theme": "testing" // enable a specific theme. there is no fallback for this yet , "site_name": "Throwdown CMS" // specifies the sitename rendered on a given views' `<title>` tag , "site_name_legal": "Throwdown CMS" // specifies a system constant you can use to change the legal name used in `/terms` and `/privacy` page files , "site_footer_copyright": "Throwdown CMS, LLC." // specifies a system constant you can use when rendering the footer copyright section // // Define your own custom things here for later use if you like // }
- Pages are created and accessed by the URL structure of your site
- The system will parse hyphens or underscores out of the
page/article.md
file name as space delimiters automagically.- Use whatever is comfortable for you and stick with it... consistency is key
http://yoursitename.com/pagename
will request the/pages/pagename.md
file which tells the system which template to load a specific template file, located inside the currently enabled theme.http://yoursitename.com/articles
will request the/articles/index.php
script and subsequent directories in the URL request string will request a given article.md file- NOTE: if a given request URL references a Markdown file that does not exist in the
/pages
directory for any given context, the system will return a 404 error, which is also managed via a404.md
file with a corresponding404.php
template. - NOTE: if a given request URL does exist and the template defined for that file does not exist in the currently enabled theme, then the system will default to the
default.php
template- The
default.php
template is required as per Theme development guidelines.
- The
- Themes are added to the
/templates
- You may enable a theme by copying its folder name exactly and using it as the argument within
config.json
As I set more things up, I'll probably re-cajigure a bunch of things here and there and better document the things that currently work. As it stands, I still need to document the template functions file and just about everything else located in the /app
directory.
More stuff coming soon :)
I know there isn't a whole lot to go on right now, but please bear with me... I'll do my best to support any and all issues submitted via Github.