
The Pagekit file structure
When you get started using Pagekit, it is important that you know your way around the file structure. As Pagekit has a very clear separation of core code and third party files, this shouldn't be a big deal.
In this post, we give you an overview of the essential files and folders. We also have another video prepared for you.
Here is a quick overview of all the folders
/app // main system files
assets // system assets
console // console extension files
installer // core Install/Update extension files
modules // core modules files. Each module has its own subfolder
system // core System extension files
vendor // external libraries that are used by Pagekit
/packages // core and 3rd party extensions
composer // packager related files
pagekit // Pagekit extensions
blog // core Blog extension
theme-one // the default theme distributed with Pagekit
/storage // site media files. You can change this location in System > Settings
/tmp // temporary files
cache // cache files
logs // log files
packages // packages temporal files
sessions // file based user sessions
temp // general temporal files
.htaccess // the Apache configuration file. Make sure is always there if using Apache
CHANGELOG.md // the Pagekit changelog file
config.php // the Pagekit configuration file generated during the installation
pagekit // the CLI entry point
pagekit.db // the database file only present if using SQLite
While it always takes some getting used to a new project's structure, you will quickly find your way around the important parts. The essential thing to know is that themes and extensions that you develop always sit in the packages
directory, inside a subfolder with your vendor name.
Additionally, it is a good idea to have a look at the official packages located in packages/pagekit
- for inspiration and a deeper understanding of the Pagekit concepts. Also, check out the modules in /app/modules
and app/system/modules
to see examples of what can be done with the module pattern.
Please give us some feedback and let us know in the comments and in our Pagekit chat what screencast do you like to see next.
Twig Support in the latest 0.9.4 release
In the latest Pagekit 0.9.4 release we've added the Twig templating engine to Pagekit's core. Twig evolved out of the Symfony framework and you can now use it to simplify your Pagekit theming. Pagekits admin panel itself still relies on PHP as the main template engine, that is due to its use of the front-end framework Vue.js. However Pagekit makes absolutely no assumption as to what should be used or preferred.
Here is a short list of all existing screencasts:
{{ 'Comments (%count%)' | trans {count:count} }}
{{ 'Comments are closed.' | trans }}