@@ -5,11 +5,14 @@ import 'package:static_shock/static_shock.dart';
5
5
Future <void > main (List <String > arguments) async {
6
6
// Configure the static website generator.
7
7
final staticShock = StaticShock ()
8
- // Here, you can directly hook into the StaticShock pipeline. For example,
9
- // you can copy an "images" directory from the source set to build set:
8
+ // Pick source files.
10
9
..pick (DirectoryPicker .parse ("images" ))
11
- // All 3rd party behavior is added through plugins, even the behavior
12
- // shipped with Static Shock.
10
+ ..pickRemote (
11
+ layouts: _remoteLayouts,
12
+ components: _remoteComponents,
13
+ assets: _remoteAssets,
14
+ )
15
+ // Add all needed plugins.
13
16
..plugin (const MarkdownPlugin ())
14
17
..plugin (const JinjaPlugin ())
15
18
..plugin (const PrettyUrlsPlugin ())
@@ -30,3 +33,80 @@ Future<void> main(List<String> arguments) async {
30
33
// Generate the static website.
31
34
await staticShock.generateSite ();
32
35
}
36
+
37
+ final _remoteLayouts = < RemoteIncludeSource > {
38
+ // Main page layout.
39
+ RemoteInclude (
40
+ url:
41
+ "https://raw.githubusercontent.com/Flutter-Bounty-Hunters/fbh_branding/main/single-page-doc-sites/_includes/layouts/homepage.jinja?raw=true" ,
42
+ name: "homepage" ,
43
+ ),
44
+ };
45
+
46
+ final _remoteComponents = < RemoteIncludeSource > {
47
+ // Contributors component (used by main page layout).
48
+ RemoteInclude (
49
+ url:
50
+ "https://raw.githubusercontent.com/Flutter-Bounty-Hunters/fbh_branding/main/single-page-doc-sites/_includes/components/contributors.jinja?raw=true" ,
51
+ name: "contributors" ,
52
+ ),
53
+ };
54
+
55
+ final _remoteAssets = < RemoteFileSource > {
56
+ // Sass styles.
57
+ HttpFileGroup .fromUrlTemplate (
58
+ "https://raw.githubusercontent.com/Flutter-Bounty-Hunters/fbh_branding/main/single-page-doc-sites/styles/\$ " ,
59
+ buildDirectory: "styles/" ,
60
+ files: {
61
+ "theme.scss" ,
62
+ "homepage.scss" ,
63
+ },
64
+ ),
65
+
66
+ // Flutter and Dart logos.
67
+ RemoteFile (
68
+ url:
69
+ "https://raw.githubusercontent.com/Flutter-Bounty-Hunters/fbh_branding/main/single-page-doc-sites/images/google/dart-logo.svg?raw=true" ,
70
+ buildPath: FileRelativePath ("images/branding/" , "dart-logo" , "svg" ),
71
+ ),
72
+ RemoteFile (
73
+ url:
74
+ "https://raw.githubusercontent.com/Flutter-Bounty-Hunters/fbh_branding/main/single-page-doc-sites/images/google/flutter-logo.svg?raw=true" ,
75
+ buildPath: FileRelativePath ("images/branding/" , "flutter-logo" , "svg" ),
76
+ ),
77
+
78
+ // Dart Favicons.
79
+ HttpFileGroup .fromUrlTemplate (
80
+ "https://github.com/Flutter-Bounty-Hunters/fbh_branding/blob/main/single-page-doc-sites/images/google/dart-favicon/\$ ?raw=true" ,
81
+ buildDirectory: "images/favicon/dart/" ,
82
+ files: {
83
+ "android-chrome-192x192.png" ,
84
+ "android-chrome-512x512.png" ,
85
+ "apple-touch-icon.png" ,
86
+ "browserconfig.xml" ,
87
+ "favicon-16x16.png" ,
88
+ "favicon-32x32.png" ,
89
+ "favicon.ico" ,
90
+ "mstile-150x150.png" ,
91
+ "site.webmanifest" ,
92
+ },
93
+ ),
94
+
95
+ // Flutter Favicons.
96
+ HttpFileGroup .fromUrlTemplate (
97
+ "https://github.com/Flutter-Bounty-Hunters/fbh_branding/blob/main/single-page-doc-sites/images/google/flutter-favicon/\$ ?raw=true" ,
98
+ buildDirectory: "images/favicon/flutter/" ,
99
+ files: {
100
+ "android-chrome-192x192.png" ,
101
+ "android-chrome-512x512.png" ,
102
+ "apple-touch-icon.png" ,
103
+ "browserconfig.xml" ,
104
+ "favicon-16x16.png" ,
105
+ "favicon-32x32.png" ,
106
+ "favicon.ico" ,
107
+ "mstile-150x150.png" ,
108
+ "safari-pinned-tab.svg" ,
109
+ "site.webmanifest" ,
110
+ },
111
+ ),
112
+ };
0 commit comments