Pagekit 文件结构
当你开始使用Pagekit时,熟悉文件结构非常重要。由于Pagekit对核心代码和第三方文件有非常清晰的分离,这应该没什么大问题。
在这篇文章中,我们将为你概述这些必备文件和文件夹。我们还为你准备了另一段视频。
视频地址(YouTube):https://www.youtube.com/watch?v=-cH53Hq7F4o
这里是所有文件夹的简要概述
/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
虽然适应新项目的结构总是需要一些时间,但你很快就会找到关键部分的流程。关键是你开发的主题和扩展总是放在目录里,包含你的供应商名称的子文件夹。packages
此外,查看官方包包也是一个好主意——以获得灵感并深入理解Pagekit的概念。另外,看看里面的模块,看看模块模式可以做些什么。packages/pagekit/app/modulesapp/system/modules
请给我们一些反馈,并在评论区和我们的Pagekit聊天中告诉我们你更想看下一个屏幕录播。
最新0.9.4版本中的树枝支持
在最新的 Pagekit 0.9.4 版本中,我们将 Twig 模板引擎加入了 Pagekit 的核心。Twig 是从 Symfony 框架演变而来的,现在你可以用它来简化你的 Pagekit 主题设计。Pagekit的管理面板本身仍然依赖PHP作为主要模板引擎,这得益于其使用了前端框架Vue.js。然而,Pagekit 完全不假设应该使用或偏好什么。
以下是所有现有屏幕的简短列表: