-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgeneral.php
35 lines (31 loc) · 968 Bytes
/
general.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* General Configuration
*
* All of your system's general configuration settings go in here. You can see a
* list of the available settings in vendor/craftcms/cms/src/config/GeneralConfig.php.
*
* @see craft\config\GeneralConfig
*/
use craft\config\GeneralConfig;
use craft\helpers\App;
$isDev = App::env('CRAFT_ENVIRONMENT') === 'dev';
$isProd = App::env('CRAFT_ENVIRONMENT') === 'production';
return GeneralConfig::create()
->aliases([
'@webroot' => App::env('WEB_ROOT_PATH'),
'@web' => App::env('SITE_URL'),
])
->allowAdminChanges($isDev)
->allowUpdates($isDev)
->devMode($isDev)
->securityKey(App::env('SECURITY_KEY'))
->disallowRobots(!$isProd)
->omitScriptNameInUrls(true)
->defaultWeekStartDay(1)
->cpTrigger(App::env('CP_TRIGGER') ?: 'admin')
->limitAutoSlugsToAscii(true)
->accessibilityDefaults([
'alwaysShowFocusRings' => true,
'useShapes' => true,
]);