Skip to content

Commit 93be13e

Browse files
committed
Use new antlers, don't require ssg but leave it configured, 404 template
1 parent 2e3935a commit 93be13e

File tree

5 files changed

+174
-4
lines changed

5 files changed

+174
-4
lines changed

config/statamic/antlers.php

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Version
8+
|--------------------------------------------------------------------------
9+
|
10+
| The desired Antlers language version to utilize. Possible values are:
11+
| - regex: Utilize pre-3.3 Antlers. Appropriate for existing sites.
12+
| - runtime: Utilizes >= 3.3 Antlers, recommended for new sites.
13+
|
14+
*/
15+
16+
'version' => 'runtime',
17+
18+
/*
19+
|--------------------------------------------------------------------------
20+
| Guarded Variables
21+
|--------------------------------------------------------------------------
22+
|
23+
| Any variable pattern that appears in this list will not be allowed
24+
| in any Antlers template, including any user-supplied values.
25+
|
26+
*/
27+
28+
'guardedVariables' => [
29+
'config.app.key',
30+
],
31+
32+
/*
33+
|--------------------------------------------------------------------------
34+
| Guarded Tags
35+
|--------------------------------------------------------------------------
36+
|
37+
| Any tag pattern that appears in this list will not be allowed
38+
| in any Antlers template, including any user-supplied values.
39+
|
40+
*/
41+
42+
'guardedTags' => [
43+
44+
],
45+
46+
/*
47+
|--------------------------------------------------------------------------
48+
| Guarded Modifiers
49+
|--------------------------------------------------------------------------
50+
|
51+
| Any modifier pattern that appears in this list will not be allowed
52+
| in any Antlers template, including any user-supplied values.
53+
|
54+
*/
55+
56+
'guardedModifiers' => [
57+
58+
],
59+
60+
];

config/statamic/ssg.php

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Base URL
8+
|--------------------------------------------------------------------------
9+
|
10+
| This informs the generator where the static site will eventually be hosted.
11+
| For instance, if you are relying on absolute URLs in your app, this one
12+
| will be used. It should be an absolute URL, eg. "http://my-app.com"
13+
|
14+
*/
15+
16+
'base_url' => config('app.url'),
17+
18+
/*
19+
|--------------------------------------------------------------------------
20+
| Destination Directory
21+
|--------------------------------------------------------------------------
22+
|
23+
| This option defines where the static files will be saved.
24+
|
25+
*/
26+
27+
'destination' => storage_path('app/static'),
28+
29+
/*
30+
|--------------------------------------------------------------------------
31+
| Files and Symlinks
32+
|--------------------------------------------------------------------------
33+
|
34+
| You are free to define a set of directories to be copied along with the
35+
| generated HTML files. For example, you may want to link your CSS,
36+
| JavaScript, static images, and perhaps any uploaded assets.
37+
| You may choose to symlink rather than copy.
38+
|
39+
*/
40+
41+
'copy' => [
42+
public_path('assets') => 'assets',
43+
public_path('css') => 'css',
44+
public_path('img') => 'img',
45+
public_path('js') => 'js',
46+
],
47+
48+
'symlinks' => [
49+
// public_path('css') => 'css',
50+
// public_path('js') => 'js',
51+
],
52+
53+
/*
54+
|--------------------------------------------------------------------------
55+
| Additional URLs
56+
|--------------------------------------------------------------------------
57+
|
58+
| Here you may define a list of additional URLs to be generated,
59+
| such as manually created routes.
60+
|
61+
*/
62+
63+
'urls' => [
64+
//
65+
],
66+
67+
/*
68+
|--------------------------------------------------------------------------
69+
| Exclude URLs
70+
|--------------------------------------------------------------------------
71+
|
72+
| Here you may define a list of URLs that should not be generated.
73+
|
74+
*/
75+
76+
'exclude' => [
77+
//
78+
],
79+
80+
/*
81+
|--------------------------------------------------------------------------
82+
| Glide
83+
|--------------------------------------------------------------------------
84+
|
85+
| Glide images are dynamically resized server-side when requesting a URL.
86+
| On a static site, you would just be serving HTML files without PHP.
87+
| Glide images will be pre-generated into the given directory.
88+
|
89+
*/
90+
91+
'glide' => [
92+
'directory' => 'img',
93+
],
94+
95+
/*
96+
|--------------------------------------------------------------------------
97+
| Failures
98+
|--------------------------------------------------------------------------
99+
|
100+
| You may configure whether the console command will exit early with a
101+
| failure status code when it encounters errors or warnings. You may
102+
| want to do this to prevent deployments in CI environments, etc.
103+
|
104+
*/
105+
106+
'failures' => false, // 'errors' or 'warnings'
107+
108+
];

content/collections/pages/en/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ meta_description: 'The Getaway is a secluded, 10 acre estate a few miles west of
7171
---
7272
The Getaway is a secluded, 10 acre estate a few miles west of Cair Paravel and just a stone's throw from the Great River. It has enjoyed a storied past in this cradle of Narnian culture as a place Lucy Pevency _almost_ visited and the Tumnus family _almost_ purchased.
7373

74-
Originally built as a priviate fish camp of a dwarven family, it later became a B&B, and to this day has remained a destination for honeymooners and adventures wanting to visit the Lamp Post, hunt the White Stag, and search for the fabled entrance to Spare Oom.
74+
Originally built as a private fish camp of a dwarven family, it later became a B&B, and to this day has remained a destination for honeymooners and adventures wanting to visit the Lamp Post, hunt the White Stag, and search for the fabled entrance to Spare Oom.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
<p>404 Page not found.</p>
1+
<div class="text-center">
2+
<p class="text-4xl">404 – Page not found.</p>
3+
</div>

starter-kit.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
export_paths:
22
- content
3+
- config/statamic/antlers.php
34
- config/statamic/editions.php
45
- config/statamic/sites.php
6+
- config/statamic/ssg.php
57
- resources/blueprints
68
- resources/fieldsets
79
- resources/forms
@@ -14,5 +16,3 @@ export_paths:
1416
- webpack.mix.js
1517
- .env.example
1618
- README.md
17-
dependencies:
18-
statamic/ssg: ^0.9.0

0 commit comments

Comments
 (0)