-
Notifications
You must be signed in to change notification settings - Fork 2
Concepts
- Cuttlefish framework functionality exists in the
site/www/system
folder. - Cuttlefish\blog functionality exists in the
site/www/application
folder. Cuttlefish is not limited to blogs, and the blog application will be split off to enforce this separation.
Cuttlefish follows the established data model, template view, logic controller pattern (MVC).
Cuttlefish supports any number of data models. These all extend Cuttlefish\Model
. Sections of content are rendered by transformations and assigned to fields that are called later by templates.
The Blog application comes with:
- ModelPage: a page consist only of markdown. Pages are also used for error pages.
- ModelPost: a post consist of a metadata section and a markdown section. A blog has posts with published date (
published:
) and tags (not yet implemented). - ModelFile: reads files present on the system, for example image files.
Sections are separated by two blank lines. Data models can be used by many controllers (the home, archive and posts controller all load posts, for example):
Controllers are attached to Routes and hook up data using the data model to the template views.
Blog controllers load data from the contentPath
as records. They then pass the records through the data model. The contents are then passed into the template.
- Cache
- Log
- Environment
- Controller
- Records
- Model
- View
- Home (posts) default homepage
- Admin (no model) administration section
- Archive (posts) post archive
- Errors (page) custom error pages
- Feeds (posts) feed of posts
- Images (file) content images
- Pages (page) individual pages
- Posts (post) individual posts
- File (present bare file)
- Page (structure for pages)
- Post (structure for posts)
- Html (templated content)
- Feed (xml representation)
- File (download)
Posts are listed in the index page. Pages contain a section of YAML followed by Markdown, by default.
Pages just contain markdown content, by default. In the basic theme, pages are linked from the footer.
Configuration settings override the defaults.
Manage your data models and theming logic using the MVC classes in the site/www/application folder.