Skip to content

Commit 2390cbc

Browse files
committed
Upgrade to 3.1
1 parent d762877 commit 2390cbc

11 files changed

Lines changed: 260 additions & 6 deletions

File tree

.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ APP_KEY=
44
APP_DEBUG=true
55
APP_URL=http://localhost
66

7+
STATAMIC_LICENSE_KEY=
8+
STATAMIC_STACHE_WATCHER=true
9+
STATAMIC_STATIC_CACHING_STRATEGY=null
10+
STATAMIC_REVISIONS_ENABLED=false
11+
STATAMIC_GRAPHQL_ENABLED=false
12+
STATAMIC_API_ENABLED=false
13+
STATAMIC_GIT_ENABLED=false
14+
715
LOG_CHANNEL=stack
816

917
DB_CONNECTION=mysql

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"guzzlehttp/guzzle": "^7.0.1",
1111
"laravel/framework": "^8.0",
1212
"laravel/tinker": "^2.0",
13-
"statamic/cms": "3.0.*",
14-
"statamic/ssg": "^0.1.0"
13+
"statamic/cms": "3.1.*",
14+
"statamic/ssg": "^0.4.0"
1515
},
1616
"require-dev": {
1717
"barryvdh/laravel-debugbar": "^3.5",
@@ -46,6 +46,9 @@
4646
"minimum-stability": "dev",
4747
"prefer-stable": true,
4848
"scripts": {
49+
"pre-update-cmd": [
50+
"Statamic\\Console\\Composer\\Scripts::preUpdateCmd"
51+
],
4952
"post-autoload-dump": [
5053
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
5154
"@php artisan package:discover --ansi",

config/statamic/api.php

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,26 @@
77
| API
88
|--------------------------------------------------------------------------
99
|
10-
| Whether the API should be enabled, and through what route.
10+
| Whether the API should be enabled, and through what route. You
11+
| can enable or disable the whole API, and expose individual
12+
| resources per environent, depending on your site needs.
13+
|
14+
| https://statamic.dev/content-api#enable-the-api
1115
|
1216
*/
1317

1418
'enabled' => env('STATAMIC_API_ENABLED', false),
1519

20+
'resources' => [
21+
'collections' => false,
22+
'navs' => false,
23+
'taxonomies' => false,
24+
'assets' => false,
25+
'globals' => false,
26+
'forms' => false,
27+
'users' => false,
28+
],
29+
1630
'route' => env('STATAMIC_API_ROUTE', 'api'),
1731

1832
/*
@@ -39,4 +53,21 @@
3953

4054
'pagination_size' => 50,
4155

56+
/*
57+
|--------------------------------------------------------------------------
58+
| Caching
59+
|--------------------------------------------------------------------------
60+
|
61+
| By default, Statamic will cache each endpoint until the specified
62+
| expiry, or until content is changed. See the documentation for
63+
| more details on how to customize your cache implementation.
64+
|
65+
| https://statamic.dev/content-api#caching
66+
|
67+
*/
68+
69+
'cache' => [
70+
'expiry' => 60,
71+
],
72+
4273
];

config/statamic/assets.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,16 @@
128128

129129
'cache_meta' => true,
130130

131+
/*
132+
|--------------------------------------------------------------------------
133+
| Focal Point Editor
134+
|--------------------------------------------------------------------------
135+
|
136+
| When editing images in the Control Panel, there is an option to choose
137+
| a focal point. When working with third-party image providers such as
138+
| Cloudinary it can be useful to disable Statamic's built-in editor.
139+
|
140+
*/
141+
142+
'focal_point_editor' => true,
131143
];

config/statamic/cp.php

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,49 @@
8383
|
8484
*/
8585

86-
'link_to_docs' => true,
86+
'link_to_docs' => env('STATAMIC_LINK_TO_DOCS', true),
87+
88+
/*
89+
|--------------------------------------------------------------------------
90+
| Support Link
91+
|--------------------------------------------------------------------------
92+
|
93+
| Set the location of the support link in the "Useful Links" header
94+
| dropdown. Use 'false' to remove it entirely.
95+
|
96+
*/
97+
98+
'support_url' => env('STATAMIC_SUPPORT_URL', 'https://statamic.com/support'),
99+
100+
/*
101+
|--------------------------------------------------------------------------
102+
| Theme
103+
|--------------------------------------------------------------------------
104+
|
105+
| Optionally spice up the login and other outside-the-control-panel
106+
| screens. You may choose between "rad" or "business" themes.
107+
|
108+
*/
109+
110+
'theme' => env('STATAMIC_THEME', 'rad'),
111+
112+
/*
113+
|--------------------------------------------------------------------------
114+
| White Labeling
115+
|--------------------------------------------------------------------------
116+
|
117+
| When in Pro Mode you may replace the Statamic name, logo, favicon,
118+
| and add your own CSS to the control panel to match your
119+
| company or client's brand.
120+
|
121+
*/
122+
123+
'custom_cms_name' => env('STATAMIC_CUSTOM_CMS_NAME', 'Statamic'),
124+
125+
'custom_logo_url' => env('STATAMIC_CUSTOM_LOGO_URL', null),
126+
127+
'custom_favicon_url' => env('STATAMIC_CUSTOM_FAVICON_URL', null),
128+
129+
'custom_css_url' => env('STATAMIC_CUSTOM_CSS_URL', null),
87130

88131
];

config/statamic/git.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,20 @@
3030

3131
'automatic' => env('STATAMIC_GIT_AUTOMATIC', true),
3232

33+
/*
34+
|--------------------------------------------------------------------------
35+
| Queue Connection
36+
|--------------------------------------------------------------------------
37+
|
38+
| You may choose which queue connection should be used when dispatching
39+
| commit jobs. Unless specified, the default connection will be used.
40+
|
41+
| https://statamic.dev/git-integration#queueing-commits
42+
|
43+
*/
44+
45+
'queue_connection' => env('STATAMIC_GIT_QUEUE_CONNECTION'),
46+
3347
/*
3448
|--------------------------------------------------------------------------
3549
| Dispatch Delay
@@ -87,6 +101,18 @@
87101
public_path('assets'),
88102
],
89103

104+
/*
105+
|--------------------------------------------------------------------------
106+
| Git Binary
107+
|--------------------------------------------------------------------------
108+
|
109+
| By default, Statamic will try to use the "git" command, but you can set
110+
| an absolute path to the git binary if necessary for your environment.
111+
|
112+
*/
113+
114+
'binary' => env('STATAMIC_GIT_BINARY', 'git'),
115+
90116
/*
91117
|--------------------------------------------------------------------------
92118
| Commands

config/statamic/graphql.php

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| GraphQL
8+
|--------------------------------------------------------------------------
9+
|
10+
| Here you may enable the GraphQL API, and select which resources
11+
| are available to be queried, depending on your site's needs.
12+
|
13+
| https://statamic.dev/graphql
14+
|
15+
*/
16+
17+
'enabled' => env('STATAMIC_GRAPHQL_ENABLED', false),
18+
19+
'resources' => [
20+
'collections' => false,
21+
'navs' => false,
22+
'taxonomies' => false,
23+
'assets' => false,
24+
'globals' => false,
25+
'sites' => false,
26+
'users' => false,
27+
],
28+
29+
/*
30+
|--------------------------------------------------------------------------
31+
| Caching
32+
|--------------------------------------------------------------------------
33+
|
34+
| By default, Statamic will cache each request until the specified
35+
| expiry, or until content is changed. See the documentation for
36+
| more details on how to customize your cache implementation.
37+
|
38+
| https://statamic.dev/graphql#caching
39+
|
40+
*/
41+
42+
'cache' => [
43+
'expiry' => 60,
44+
],
45+
46+
];

config/statamic/stache.php

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
|
1616
*/
1717

18-
'watcher' => true,
18+
'watcher' => env('STATAMIC_STACHE_WATCHER', true),
1919

2020
/*
2121
|--------------------------------------------------------------------------
@@ -53,6 +53,16 @@
5353
'directory' => base_path('content/navigation'),
5454
],
5555

56+
'collection-trees' => [
57+
'class' => Stores\CollectionTreeStore::class,
58+
'directory' => base_path('content/trees/collections'),
59+
],
60+
61+
'nav-trees' => [
62+
'class' => Stores\NavTreeStore::class,
63+
'directory' => base_path('content/trees/navigation'),
64+
],
65+
5666
'globals' => [
5767
'class' => Stores\GlobalsStore::class,
5868
'directory' => base_path('content/globals'),
@@ -63,6 +73,10 @@
6373
'directory' => base_path('content/assets'),
6474
],
6575

76+
'assets' => [
77+
'class' => Stores\AssetsStore::class,
78+
],
79+
6680
'users' => [
6781
'class' => Stores\UsersStore::class,
6882
'directory' => base_path('users'),
@@ -85,4 +99,22 @@
8599
//
86100
],
87101

102+
/*
103+
|--------------------------------------------------------------------------
104+
| Locking
105+
|--------------------------------------------------------------------------
106+
|
107+
| In order to prevent concurrent requests from updating the Stache at
108+
| the same and wasting resources, it will be "locked" so subsequent
109+
| requests will have to wait until the first has been completed.
110+
|
111+
| https://statamic.dev/stache#locks
112+
|
113+
*/
114+
115+
'lock' => [
116+
'enabled' => true,
117+
'timeout' => 30,
118+
],
119+
88120
];

config/statamic/static_caching.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
|
1313
*/
1414

15-
'strategy' => null,
15+
'strategy' => env('STATAMIC_STATIC_CACHING_STRATEGY', null),
1616

1717
/*
1818
|--------------------------------------------------------------------------
@@ -79,4 +79,17 @@
7979

8080
],
8181

82+
/*
83+
|--------------------------------------------------------------------------
84+
| Ignoring Query Strings
85+
|--------------------------------------------------------------------------
86+
|
87+
| Statamic will cache pages of the same URL but with different query
88+
| parameters separately. This is useful for pages with pagination.
89+
| If you'd like to ignore the query strings, you may do so.
90+
|
91+
*/
92+
93+
'ignore_query_strings' => false,
94+
8295
];

config/statamic/system.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,19 @@
8181

8282
'track_last_update' => true,
8383

84+
/*
85+
|--------------------------------------------------------------------------
86+
| Enable Cache Tags
87+
|--------------------------------------------------------------------------
88+
|
89+
| Sometimes you'll want to be able to disable the {{ cache }} tags in
90+
| Antlers, so here is where you can do that. Otherwise, it will be
91+
| enabled all the time.
92+
|
93+
*/
94+
95+
'cache_tags_enabled' => env('STATAMIC_CACHE_TAGS_ENABLED', true),
96+
8497
/*
8598
|--------------------------------------------------------------------------
8699
| Intensive Operations

0 commit comments

Comments
 (0)