bramdeleeuw / recipe-boilerplate
快速启动新 SilverStripe 项目的模板
4.4.1
2022-11-16 12:07 UTC
Requires
- axllent/silverstripe-image-optimiser: dev-master
- axllent/silverstripe-scaled-uploads: *
- bramdeleeuw/cookieconsent: *
- bramdeleeuw/silverstripe-schema: *
- colymba/gridfield-bulk-editing-tools: *
- dnadesign/silverstripe-elemental: *
- dnadesign/silverstripe-elemental-userforms: *
- dnadesign/silverstripe-elemental-virtual: *
- dorsetdigital/silverstripe-enhanced-requirements: *
- dorsetdigital/silverstripe-htmlminifier: *
- guzzlehttp/guzzle: *
- jonom/focuspoint: *
- jonom/silverstripe-betternavigator: *
- jonom/silverstripe-share-care: *
- jonom/silverstripe-text-target-length: *
- lekoala/silverstripe-cms-actions: *
- lekoala/silverstripe-excel-import-export: *
- mobiledetect/mobiledetectlib: *
- php-http/guzzle7-adapter: ^1.0
- php-http/message: *
- rosell-dk/webp-convert: *
- ryanpotter/silverstripe-cms-theme: *
- silverstripe/googlesitemaps: *
- silverstripe/html5: *
- silverstripe/recipe-cms: 4.x@stable
- silverstripe/recipe-plugin: ^1.5
- silverstripe/redirectedurls: *
- silverstripe/spamprotection: *
- silverstripe/tagfield: *
- silverstripe/userforms: *
- swisnl/geocoder-php-nationaal-georegister-provider: *
- symbiote/silverstripe-addressable: dev-master
- symbiote/silverstripe-gridfieldextensions: *
- tractorcow/silverstripe-opengraph: *
- undefinedoffset/silverstripe-nocaptcha: *
- xddesigners/honeypotfield: *
- xddesigners/iconselectfield: *
- xddesigners/page-content-block: *
- xddesigners/silverstripe-dropzonefield: *
- xddesigners/silverstripe-urlsegment-copy-button: *
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-22 11:07:35 UTC
README
SilverStripe Boilerplate 旨在简化新 SilverStripe 项目的启动,只需下载并开始使用。
维护者
- Bram de Leeuw @bramdeleeuw
如何安装
# create the project
# make sure to point to the new remote afterwards
composer create-project bramdeleeuw/recipe-boilerplate ./myproject dev-master
配置(使用 .env
)
您可以将 .env.example
文件重命名为 .env
,该文件应如下所示(更多信息请参阅 https://docs.silverstripe.org/en/4/getting_started/environment_management/)
此方法建议用于数据库和环境配置,因为您可以从版本控制中轻松排除它
# What kind of environment is this: development, test, or live (ie, production)?
SS_ENVIRONMENT_TYPE="dev"
# Database settings
SS_DATABASE_SERVER="localhost"
SS_DATABASE_USERNAME="USER"
SS_DATABASE_PASSWORD="PASSWORD"
SS_DATABASE_NAME="DB_NAME"
# Configure a default username and password to access the CMS on all sites in this environment.
SS_DEFAULT_ADMIN_USERNAME="admin"
SS_DEFAULT_ADMIN_PASSWORD="password"
# Make sure the command line knows what the site url is
SS_BASE_URL="http://example.com"
现在只需运行 mysite.com/dev/build,您就完成了,不需要进一步设置,您可以开始使用了
如何使用
此模板基于假设项目将是一个定制的网站/网络应用程序。因此,您可能会注意到主题文件夹中没有主题,计划是将所有模板、JavaScript 和 css/scss 添加到 mysite。这的好处是将整个项目放在一个地方,而不是分成两个文件夹。
文件结构
app
|-- src // your php code in here
|-- client // your frond end code goes in here
| |-- src
| | |-- js // your js files and modules
| | |-- styles // your sass files and modules
| |-- dist // compiled code
|-- images // project images
|-- templates // your templates, that others put into themes/mytheme/templates
|-- .gitignore
|-- .htaccess
|-- _config.php
|-- package.json
|-- webpack.mix.js
|-- yarn.lock