mia3 / typo3-base
此软件包已被废弃,不再维护。未建议替代软件包。
TYPO3 CMS 基础发行版
9.5.5
2019-03-04 22:48 UTC
Requires
- php: ^7.2
- fluidtypo3/vhs: ^5.1
- helhum/typo3-console: ^5.6
- mask/mask: ^4.1
- typo3/cms-about: ^9.5
- typo3/cms-adminpanel: ^9.5
- typo3/cms-belog: ^9.5
- typo3/cms-beuser: ^9.5
- typo3/cms-felogin: ^9.5
- typo3/cms-fluid-styled-content: ^9.5
- typo3/cms-form: ^9.5
- typo3/cms-impexp: ^9.5
- typo3/cms-info: ^9.5
- typo3/cms-recycler: ^9.5
- typo3/cms-redirects: ^9.5
- typo3/cms-reports: ^9.5
- typo3/cms-rte-ckeditor: ^9.5
- typo3/cms-seo: ^9.5
- typo3/cms-setup: ^9.5
- typo3/cms-sys-note: ^9.5
- typo3/cms-t3editor: ^9.5
- typo3/cms-tstemplate: ^9.5
- typo3/cms-viewpage: ^9.5
- typo3/minimal: ^9.5
This package is auto-updated.
Last update: 2023-01-06 01:41:51 UTC
README
快速开始使用 TYPO3 CMS。
先决条件
- PHP 7.2
- Composer
- ImageMagick
- GraphicsMagick
快速入门
composer create-project mia3/typo3-base project-name --stability=dev
cd project-name
git init
git add .
git commit -a -m "Initial commit"
make setup
设置 / 安装
- 要开始你的项目,运行以下命令克隆此仓库
git clone ssh://git@gitlab.mia3.com:2222/mia3/typo3.git
- 然后运行以下命令,进入项目文件夹
cd acme.com
- 运行此命令后,你应该可以运行以下命令来安装 TYPO3 和所有必要的依赖项
make install
- 设置本地服务器环境(例如:MAMP)并为此项目创建一个新的数据库。为了避免“应用程序上下文”的错误,使用
local.acme.com
作为此环境的域名。 - 现在你可以运行以下命令,设置你的本地数据库连接。
make setup/env
- 输入你的本地数据库信息,然后运行
make pull-backup
这将从最后备份下载图像和数据库备份。如果一切设置正确,数据库备份将自动导入到创建的数据库中。 - 最后,你应该执行以下命令来捆绑所有 CSS 和 JavaScript 文件。
make build/watch
目录结构
assets/
├── template/
│ ├── Scripts/
│ ├── Components/
│ ├── Button/
│ ├── Form/
│ ├── MobileMenu/
│ ├── Utility/
│ ├── Styles/
│ ├── Base/
│ ├── ContentElements/
│ ├── Extensions/
│ ├── PageLayout/
│ ├── Utility/
config/
packages/
├── template/
│ ├── Classes/
│ ├── Controller/
│ ├── Domain/
│ ├── Service/
│ ├── TcaUserFunctions/
│ ├── Utility/
│ ├── ViewHelpers/
│ ├── Configuraton/
│ ├── FlexForms/
│ ├── RTE/
│ ├── TCA/
│ ├── Overrides/
│ ├── Mask/
│ ├── Columns/
│ ├── Pages/
│ ├── Types/
│ ├── tt_content/
│ ├── TsConfig/
│ ├── TypoScript/
│ ├── Initialisation/
│ ├── Resources/
│ ├── Private/
│ ├── ExtensionOverrides/
│ ├── Language/
│ ├── Mask/
│ ├── Partials/
│ ├── Templates/
│ ├── Pulblic/
public/
webpack/
目录说明
assets/
. 模板扩展的所有资源Scripts/
. 所有 Vue 组件和 JavaScript 文件Styles/
. 所有样式Base/
. 简单和通用样式(字体、表单、按钮等)ContentElements/
. 模板扩展中所有内容元素的样式Extensions/
. 覆盖第三方扩展的样式PageLayout/
. 页面布局组件(如页眉、页脚等)的样式Utility/
. 在许多情况下有用的样式,并且可高度重用
config/
. TYPO3 网站配置packages/
. 用于加载此页面自定义扩展的 composer 本地仓库template/
. 此网站的定制模板扩展Classes/
Controller/
. 此扩展的控制器Domain/
. 此扩展的领域模型Service/
. 此扩展的服务TcaUserFunctions/
. 支持和扩展 TCA 功能的类Utility/
. 旨在使你的生活更轻松的实用工具类ViewHelpers/
. 适用于各种情况的自定义视图助手
Configuration/
TCA/Overrides/
. TCA 覆盖Mask/
. 面具元素的 TCA 覆盖Columns/
. 覆盖面具列Pages/
. 通过页面类型/后端布局覆盖 TCATypes/
. 通过类型覆盖面具字段
tt_content/
. 覆盖 TYPO3 原生字段
Resources/
Private/
ExtensionOverrides/
. 覆盖第三方扩展的模板文件Language/
. 语言文件Mask/
. 遮罩模板文件(后端 + 前端)Partials/
. 通用部分Templates/
. 通用模板
webpack/
. 分割的 webpack 配置文件,可用于将多个构建过程合并为一个
Makefile
使用 Make,我们可以组合多个命令而无需编写 bash 脚本。
现有命令
本地环境
make setup # Setup the new project make build/watch # Build assets with sourcemaps and watch for changes make install-dependencies # Install composer and yarn dependencies make update-dependencies # Update composer and yarn dependencies make setup/database-connection # Create an AdditionalConfiguration.php make migrate # Apply database migration make build # Build assets with sourcemaps make build/production # Build minified assets make clear-cache # Clear TYPO3 cache make pull-backup # Download latest files and import database dump from operations.mia3.com
预发布环境
make staging/deploy Deploys to staging from your local machine. Updates database schema and flushes caches. make staging/clear-cache Flush staging caches. make staging/push-backup: Deploys local database to staging from your machine.
生产环境
make production/deploy # Try not to use this command. Always deploy from GitLab to the production environment.
CSS 和 JavaScript
CSS 和 JavaScript 文件位于 assets
目录。
表单
每个表单都有自己的插件。要添加另一个表单
- 创建域模型 ->
Classes/Domain/Model/MyFormRequest.php
- 注册新插件 ->
Configuration/TCA/Overrides/tt_content.php
- 配置新插件 ->
ext_localconf.php
- 创建 flexform ->
Configuration/FlexForm/MyForm.xml
待办事项
- 更新 README.md
- 在哪里添加 CSS
- 在哪里添加 JS
- page.meta.description 空默认值?
- 如何使用 CSS 变量(postcss-config.js)
- 网站 URL 配置
开发/本地
- ->
Development/Integration
- ->
Production/Staging
- ->
Production